Class: Edoxen::Motion

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/edoxen/motion.rb,
sig/edoxen.rbs

Overview

Procedural.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#identifierString? (readonly)

Returns the value of attribute identifier.

Returns:

  • (String, nil)


198
199
200
# File 'sig/edoxen.rbs', line 198

def identifier
  @identifier
end

#introduced_atObject (readonly)

Returns the value of attribute introduced_at.

Returns:

  • (Object)


204
205
206
# File 'sig/edoxen.rbs', line 204

def introduced_at
  @introduced_at
end

#moverPerson? (readonly)

Returns the value of attribute mover.

Returns:



201
202
203
# File 'sig/edoxen.rbs', line 201

def mover
  @mover
end

#proposed_decisionString? (readonly)

Returns the value of attribute proposed_decision.

Returns:

  • (String, nil)


205
206
207
# File 'sig/edoxen.rbs', line 205

def proposed_decision
  @proposed_decision
end

#resulting_decisionString? (readonly)

Returns the value of attribute resulting_decision.

Returns:

  • (String, nil)


206
207
208
# File 'sig/edoxen.rbs', line 206

def resulting_decision
  @resulting_decision
end

#secondersArray[Person]? (readonly)

Returns the value of attribute seconders.

Returns:



202
203
204
# File 'sig/edoxen.rbs', line 202

def seconders
  @seconders
end

#statusString? (readonly)

Returns the value of attribute status.

Returns:

  • (String, nil)


203
204
205
# File 'sig/edoxen.rbs', line 203

def status
  @status
end

#textString? (readonly)

Returns the value of attribute text.

Returns:

  • (String, nil)


200
201
202
# File 'sig/edoxen.rbs', line 200

def text
  @text
end

#urnString? (readonly)

Returns the value of attribute urn.

Returns:

  • (String, nil)


199
200
201
# File 'sig/edoxen.rbs', line 199

def urn
  @urn
end

#votingsArray[String]? (readonly)

Returns the value of attribute votings.

Returns:

  • (Array[String], nil)


207
208
209
# File 'sig/edoxen.rbs', line 207

def votings
  @votings
end

Instance Method Details

#carried?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/edoxen/motion.rb', line 31

def carried?
  status == "carried"
end

#pending?Boolean

Returns:

  • (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