Class: Stretto::Tokens::KeySignatureToken
Overview
Token result from parsing a key signature
Instance Method Summary collapse
-
#key ⇒ Object
A string with the key.
-
#scale ⇒ 'maj', 'min'
The scale of the key signature.
-
#to_stretto(pattern = nil) ⇒ MusicElements::KeySignature
The constructed token.
Methods inherited from HashToken
Instance Method Details
#key ⇒ Object
Returns A string with the key.
18 19 20 |
# File 'lib/stretto/grammar/tokens/key_signature_token.rb', line 18 def key __note_key.text_value end |
#scale ⇒ 'maj', 'min'
Returns The scale of the key signature.
23 24 25 |
# File 'lib/stretto/grammar/tokens/key_signature_token.rb', line 23 def scale __scale.text_value end |
#to_stretto(pattern = nil) ⇒ MusicElements::KeySignature
Returns The constructed token.
12 13 14 |
# File 'lib/stretto/grammar/tokens/key_signature_token.rb', line 12 def to_stretto(pattern = nil) Stretto::MusicElements::KeySignature.new(self, pattern) end |