Class: Music::Transcription::Change
- Inherits:
-
Object
- Object
- Music::Transcription::Change
- Defined in:
- lib/music-transcription/model/change.rb,
lib/music-transcription/packing/change_packing.rb
Defined Under Namespace
Classes: Gradual, Immediate, Partial
Instance Attribute Summary collapse
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(value, duration) ⇒ Change
constructor
A new instance of Change.
Constructor Details
#initialize(value, duration) ⇒ Change
Returns a new instance of Change.
7 8 9 10 |
# File 'lib/music-transcription/model/change.rb', line 7 def initialize value, duration @value = value @duration = duration end |
Instance Attribute Details
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
5 6 7 |
# File 'lib/music-transcription/model/change.rb', line 5 def duration @duration end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
5 6 7 |
# File 'lib/music-transcription/model/change.rb', line 5 def value @value end |
Class Method Details
Instance Method Details
#==(other) ⇒ Object
12 13 14 15 16 |
# File 'lib/music-transcription/model/change.rb', line 12 def ==(other) self.class == other.class && self.value == other.value && self.duration == other.duration end |