Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/musicality/notation/parsing/convenience_methods.rb
Instance Method Summary collapse
- #to_duration ⇒ Object (also: #to_dur, #to_d)
- #to_durations(pattern = " ") ⇒ Object (also: #to_durs, #to_ds)
- #to_meter ⇒ Object
- #to_note ⇒ Object (also: #to_n)
- #to_notes(pattern = " ") ⇒ Object (also: #to_ns)
- #to_pitch ⇒ Object (also: #to_p)
- #to_pitches(pattern = " ") ⇒ Object (also: #to_ps)
- #to_segment ⇒ Object
Instance Method Details
#to_duration ⇒ Object Also known as: to_dur, to_d
35 36 37 |
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 35 def to_duration Musicality::Duration.parse(self) end |
#to_durations(pattern = " ") ⇒ Object Also known as: to_durs, to_ds
41 42 43 |
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 41 def to_durations pattern=" " Musicality::Duration.split_parse(self, pattern) end |
#to_meter ⇒ Object
67 68 69 |
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 67 def to_meter Musicality::Meter.parse(self) end |
#to_note ⇒ Object Also known as: to_n
57 58 59 |
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 57 def to_note Musicality::Note.parse(self) end |
#to_notes(pattern = " ") ⇒ Object Also known as: to_ns
62 63 64 |
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 62 def to_notes pattern=" " Musicality::Note.split_parse(self, pattern) end |
#to_pitch ⇒ Object Also known as: to_p
47 48 49 |
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 47 def to_pitch Musicality::Pitch.parse(self) end |
#to_pitches(pattern = " ") ⇒ Object Also known as: to_ps
52 53 54 |
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 52 def to_pitches pattern=" " Musicality::Pitch.split_parse(self, pattern) end |
#to_segment ⇒ Object
71 72 73 |
# File 'lib/musicality/notation/parsing/convenience_methods.rb', line 71 def to_segment Musicality::Segment.parse(self) end |