class Poll
- Poll
- Reference
- Object
Included Modules
Extended Modules
Defined in:
models/poll.crInstance Method Summary
- #_association_question
- #_belongs_to_setter_for_question(question_ : ActivityPub::Object::Question, update_associations = true) : ActivityPub::Object::Question
-
#adjust_votes(question, actor)
Adjusts vote tallies.
- #closed_at : Time | Nil
- #closed_at=(closed_at : Time | Nil)
- #expired?
- #multiple_choice : Bool
- #multiple_choice=(multiple_choice : Bool)
- #options : Array(Option)
- #options=(options : Array(Option))
- #question(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Object::Question
- #question=(question_ : ActivityPub::Object::Question) : ActivityPub::Object::Question
- #question?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Object::Question | Nil
- #question_iri : String | Nil
- #question_iri=(question_iri : String | Nil)
- #voters_count : Int32 | Nil
- #voters_count=(voters_count : Int32 | Nil)
Instance methods inherited from module Ktistec::Model::Common
created_at : Time
created_at,
created_at=(created_at : Time)
created_at=,
updated_at : Time
updated_at,
updated_at=(updated_at : Time)
updated_at=
Instance methods inherited from module Ktistec::Model
==(other : self)==(other) ==, _run_validations _run_validations, _save_model(skip_validation = false) _save_model, _serialize_graph(nodes, association = nil, index = nil, skip_associated = false) _serialize_graph, assign(properties : Hash(String, Any), *, _strict : Bool = false) forall Any
assign(*, _strict : Bool = false, **properties) assign, changed!(*properties : Symbol) changed!, changed?
changed?(*properties : Symbol) changed?, clear_changed!
clear_changed!(*properties : Symbol) clear_changed!, destroy destroy, destroyed? destroyed?, errors errors, hash(hasher) hash, id : Int64 | Nil id, id=(id : Int64 | Nil) id=, inspect(io : IO) inspect, new_record? new_record?, reload! reload!, save(skip_validation = false, skip_associated = false) save, serialize_graph(skip_associated = false) serialize_graph, table_name table_name, to_h to_h, to_json(json : JSON::Builder) to_json, to_s(io : IO) to_s, update_property(property, value) update_property, valid?(skip_associated = false) valid?, validate(skip_associated = false) validate
Constructor methods inherited from module Ktistec::Model
new(properties : Hash(String, Any), *, _strict : Bool = false) forall Anynew(*, _strict : Bool = false, **properties) new
Macros inherited from module Ktistec::Model
belongs_to(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil)
belongs_to,
derived(decl, *, aliased_to)
derived,
has_many(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil)
has_many,
has_one(name, primary_key = id, foreign_key = nil, class_name = nil, inverse_of = nil)
has_one,
validates(property, &block)
validates
Instance Method Detail
def _belongs_to_setter_for_question(question_ : ActivityPub::Object::Question, update_associations = true) : ActivityPub::Object::Question
#
def adjust_votes(question, actor)
#
Adjusts vote tallies.
Adds +1 to vote tallies for each vote created after the last question update.
def question(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Object::Question
#
def question?(include_deleted : Bool = false, include_undone : Bool = false) : ActivityPub::Object::Question | Nil
#