Class: Stretto::MusicElements::LayerChange
- Inherits:
-
MusicElement
- Object
- MusicElement
- Stretto::MusicElements::LayerChange
- Defined in:
- lib/stretto/music_elements/layer_change.rb
Constant Summary collapse
- MAX_LAYERS =
15
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
Attributes inherited from MusicElement
Attributes included from Node
Instance Method Summary collapse
-
#initialize(string_or_options, pattern = nil) ⇒ LayerChange
constructor
A new instance of LayerChange.
- #substitute_variables! ⇒ Object
Methods inherited from MusicElement
#build_music_string, #duration, #end_of_tie?, #start_of_tie?, #to_s
Constructor Details
#initialize(string_or_options, pattern = nil) ⇒ LayerChange
Returns a new instance of LayerChange.
12 13 14 15 16 17 18 19 |
# File 'lib/stretto/music_elements/layer_change.rb', line 12 def initialize(, pattern = nil) token = case when String then Stretto::Parser.parse_layer_change!() else end super(token[:text_value], pattern) @original_value = token[:value] end |
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index.
10 11 12 |
# File 'lib/stretto/music_elements/layer_change.rb', line 10 def index @index end |
Instance Method Details
#substitute_variables! ⇒ Object
32 33 34 |
# File 'lib/stretto/music_elements/layer_change.rb', line 32 def substitute_variables! self.index = index end |