Class: Edoxen::Motion
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Edoxen::Motion
- Defined in:
- lib/edoxen/motion.rb,
sig/edoxen.rbs
Overview
Procedural.
Instance Attribute Summary collapse
-
#identifier ⇒ String?
readonly
Returns the value of attribute identifier.
-
#introduced_at ⇒ Object
readonly
Returns the value of attribute introduced_at.
-
#mover ⇒ Person?
readonly
Returns the value of attribute mover.
-
#proposed_decision ⇒ String?
readonly
Returns the value of attribute proposed_decision.
-
#resulting_decision ⇒ String?
readonly
Returns the value of attribute resulting_decision.
-
#seconders ⇒ Array[Person]?
readonly
Returns the value of attribute seconders.
-
#status ⇒ String?
readonly
Returns the value of attribute status.
-
#text ⇒ String?
readonly
Returns the value of attribute text.
-
#urn ⇒ String?
readonly
Returns the value of attribute urn.
-
#votings ⇒ Array[String]?
readonly
Returns the value of attribute votings.
Instance Method Summary collapse
- #carried? ⇒ Boolean
- #pending? ⇒ Boolean
-
#votings_in(meeting:) ⇒ Object
--- v2.1 derivation accessor (TODO.refactor/45) -------------------- Storage side: Voting.on_motion (SSOT for the Motion→Voting relationship).
Instance Attribute Details
#identifier ⇒ String? (readonly)
Returns the value of attribute identifier.
198 199 200 |
# File 'sig/edoxen.rbs', line 198 def identifier @identifier end |
#introduced_at ⇒ Object (readonly)
Returns the value of attribute introduced_at.
204 205 206 |
# File 'sig/edoxen.rbs', line 204 def introduced_at @introduced_at end |
#mover ⇒ Person? (readonly)
Returns the value of attribute mover.
201 202 203 |
# File 'sig/edoxen.rbs', line 201 def mover @mover end |
#proposed_decision ⇒ String? (readonly)
Returns the value of attribute proposed_decision.
205 206 207 |
# File 'sig/edoxen.rbs', line 205 def proposed_decision @proposed_decision end |
#resulting_decision ⇒ String? (readonly)
Returns the value of attribute resulting_decision.
206 207 208 |
# File 'sig/edoxen.rbs', line 206 def resulting_decision @resulting_decision end |
#seconders ⇒ Array[Person]? (readonly)
Returns the value of attribute seconders.
202 203 204 |
# File 'sig/edoxen.rbs', line 202 def seconders @seconders end |
#status ⇒ String? (readonly)
Returns the value of attribute status.
203 204 205 |
# File 'sig/edoxen.rbs', line 203 def status @status end |
#text ⇒ String? (readonly)
Returns the value of attribute text.
200 201 202 |
# File 'sig/edoxen.rbs', line 200 def text @text end |
#urn ⇒ String? (readonly)
Returns the value of attribute urn.
199 200 201 |
# File 'sig/edoxen.rbs', line 199 def urn @urn end |
#votings ⇒ Array[String]? (readonly)
Returns the value of attribute votings.
207 208 209 |
# File 'sig/edoxen.rbs', line 207 def votings @votings end |
Instance Method Details
#carried? ⇒ Boolean
31 32 33 |
# File 'lib/edoxen/motion.rb', line 31 def carried? status == "carried" end |
#pending? ⇒ Boolean
35 36 37 |
# File 'lib/edoxen/motion.rb', line 35 def pending? status && !Enums::MOTION_TERMINAL.include?(status) end |
#votings_in(meeting:) ⇒ Object
--- v2.1 derivation accessor (TODO.refactor/45) --------------------
Storage side: Voting.on_motion (SSOT for the Motion→Voting
relationship). This computed method returns the Voting instances
in meeting whose on_motion points at this Motion's URN.
The stored votings[] field remains on the wire for back-compat
through v2.x; v3.0 removes it and this becomes the only path.
45 46 47 48 49 |
# File 'lib/edoxen/motion.rb', line 45 def votings_in(meeting:) return [] unless meeting && urn meeting.votings.select { |voting| voting.on_motion == urn } end |