Class: Clef::Ir::Event
- Inherits:
-
Object
- Object
- Clef::Ir::Event
- Defined in:
- lib/clef/ir/event.rb
Instance Attribute Summary collapse
-
#element ⇒ Object
readonly
Returns the value of attribute element.
-
#moment ⇒ Object
readonly
Returns the value of attribute moment.
-
#staff_id ⇒ Object
readonly
Returns the value of attribute staff_id.
-
#voice_id ⇒ Object
readonly
Returns the value of attribute voice_id.
Instance Method Summary collapse
-
#initialize(moment:, element:, staff_id: nil, voice_id: nil) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(moment:, element:, staff_id: nil, voice_id: nil) ⇒ Event
Returns a new instance of Event.
12 13 14 15 16 17 18 19 |
# File 'lib/clef/ir/event.rb', line 12 def initialize(moment:, element:, staff_id: nil, voice_id: nil) raise ArgumentError, "moment must be a Clef::Ir::Moment" unless moment.is_a?(Moment) @moment = moment @element = element @staff_id = staff_id @voice_id = voice_id end |
Instance Attribute Details
#element ⇒ Object (readonly)
Returns the value of attribute element.
6 7 8 |
# File 'lib/clef/ir/event.rb', line 6 def element @element end |
#moment ⇒ Object (readonly)
Returns the value of attribute moment.
6 7 8 |
# File 'lib/clef/ir/event.rb', line 6 def moment @moment end |
#staff_id ⇒ Object (readonly)
Returns the value of attribute staff_id.
6 7 8 |
# File 'lib/clef/ir/event.rb', line 6 def staff_id @staff_id end |
#voice_id ⇒ Object (readonly)
Returns the value of attribute voice_id.
6 7 8 |
# File 'lib/clef/ir/event.rb', line 6 def voice_id @voice_id end |