Module: Stretto::Tokens::NotePitchToken
- Defined in:
- lib/stretto/grammar/tokens/note_string_token.rb
Overview
Token from parsing a note pitch, when an explicit pitch is given.
Instance Method Summary collapse
-
#accidental ⇒ Object
Always return nil.
-
#key ⇒ Object
Always return nil.
-
#octave ⇒ Object
Always return nil.
-
#pitch ⇒ Value
Wraps the value into a Value object, either a numeric or a variable value.
Instance Method Details
#accidental ⇒ Object
Always return nil
12 13 14 |
# File 'lib/stretto/grammar/tokens/note_string_token.rb', line 12 def accidental nil end |
#key ⇒ Object
Always return nil
24 25 26 |
# File 'lib/stretto/grammar/tokens/note_string_token.rb', line 24 def key nil end |
#octave ⇒ Object
Always return nil
18 19 20 |
# File 'lib/stretto/grammar/tokens/note_string_token.rb', line 18 def octave nil end |
#pitch ⇒ Value
Wraps the value into a Value object, either a numeric or a variable value
30 31 32 33 34 35 36 37 |
# File 'lib/stretto/grammar/tokens/note_string_token.rb', line 30 def pitch klass = if _pitch.is_numeric? Value::NumericValue else Value::VariableValue end Value.new(klass.new(_pitch.text_value)) end |