Class: Edoxen::Voting
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Edoxen::Voting
- Defined in:
- lib/edoxen/voting.rb,
sig/edoxen.rbs
Overview
Voting — state machine for a single vote on a Motion. Multiple votings can occur on the same Motion (e.g., unclear voice vote → chair calls a formal division → second Voting instance).
State machine (VotingStatus):
called → in_progress → decided | withdrawn | deferred
Instance Attribute Summary collapse
-
#called_at ⇒ Object
readonly
Returns the value of attribute called_at.
-
#called_by ⇒ Person?
readonly
Returns the value of attribute called_by.
-
#casting_vote ⇒ VoteRecord?
readonly
Returns the value of attribute casting_vote.
-
#counts ⇒ VotingCounts?
readonly
Returns the value of attribute counts.
-
#identifier ⇒ String?
readonly
Returns the value of attribute identifier.
-
#on_motion ⇒ String?
readonly
Returns the value of attribute on_motion.
-
#result ⇒ String?
readonly
Returns the value of attribute result.
-
#result_declared_at ⇒ Object
readonly
Returns the value of attribute result_declared_at.
-
#status ⇒ String?
readonly
Returns the value of attribute status.
-
#urn ⇒ String?
readonly
Returns the value of attribute urn.
-
#vote_records ⇒ Array[VoteRecord]?
readonly
Returns the value of attribute vote_records.
-
#voting_method ⇒ String?
readonly
Returns the value of attribute voting_method.
Instance Method Summary collapse
- #decided? ⇒ Boolean
- #in_progress? ⇒ Boolean
- #negatived? ⇒ Boolean
- #passed? ⇒ Boolean
- #tied? ⇒ Boolean
Instance Attribute Details
#called_at ⇒ Object (readonly)
Returns the value of attribute called_at.
241 242 243 |
# File 'sig/edoxen.rbs', line 241 def called_at @called_at end |
#called_by ⇒ Person? (readonly)
Returns the value of attribute called_by.
240 241 242 |
# File 'sig/edoxen.rbs', line 240 def called_by @called_by end |
#casting_vote ⇒ VoteRecord? (readonly)
Returns the value of attribute casting_vote.
245 246 247 |
# File 'sig/edoxen.rbs', line 245 def casting_vote @casting_vote end |
#counts ⇒ VotingCounts? (readonly)
Returns the value of attribute counts.
244 245 246 |
# File 'sig/edoxen.rbs', line 244 def counts @counts end |
#identifier ⇒ String? (readonly)
Returns the value of attribute identifier.
235 236 237 |
# File 'sig/edoxen.rbs', line 235 def identifier @identifier end |
#on_motion ⇒ String? (readonly)
Returns the value of attribute on_motion.
237 238 239 |
# File 'sig/edoxen.rbs', line 237 def on_motion @on_motion end |
#result ⇒ String? (readonly)
Returns the value of attribute result.
243 244 245 |
# File 'sig/edoxen.rbs', line 243 def result @result end |
#result_declared_at ⇒ Object (readonly)
Returns the value of attribute result_declared_at.
242 243 244 |
# File 'sig/edoxen.rbs', line 242 def result_declared_at @result_declared_at end |
#status ⇒ String? (readonly)
Returns the value of attribute status.
238 239 240 |
# File 'sig/edoxen.rbs', line 238 def status @status end |
#urn ⇒ String? (readonly)
Returns the value of attribute urn.
236 237 238 |
# File 'sig/edoxen.rbs', line 236 def urn @urn end |
#vote_records ⇒ Array[VoteRecord]? (readonly)
Returns the value of attribute vote_records.
246 247 248 |
# File 'sig/edoxen.rbs', line 246 def vote_records @vote_records end |
#voting_method ⇒ String? (readonly)
Returns the value of attribute voting_method.
239 240 241 |
# File 'sig/edoxen.rbs', line 239 def voting_method @voting_method end |
Instance Method Details
#decided? ⇒ Boolean
25 26 27 |
# File 'lib/edoxen/voting.rb', line 25 def decided? status == "decided" end |
#in_progress? ⇒ Boolean
29 30 31 |
# File 'lib/edoxen/voting.rb', line 29 def in_progress? status == "in_progress" end |
#negatived? ⇒ Boolean
37 38 39 |
# File 'lib/edoxen/voting.rb', line 37 def negatived? decided? && result == "negatived" end |
#passed? ⇒ Boolean
33 34 35 |
# File 'lib/edoxen/voting.rb', line 33 def passed? decided? && result == "passed" end |
#tied? ⇒ Boolean
41 42 43 |
# File 'lib/edoxen/voting.rb', line 41 def tied? decided? && result == "tied" end |