Class: GuitarProParser::Beat
- Inherits:
-
Object
- Object
- GuitarProParser::Beat
- Defined in:
- lib/guitar_pro_parser/beat.rb
Instance Attribute Summary collapse
-
#chord_diagram ⇒ Object
Returns the value of attribute chord_diagram.
-
#dotted ⇒ Object
Returns the value of attribute dotted.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#effects ⇒ Object
Returns the value of attribute effects.
-
#mix_table ⇒ Object
Returns the value of attribute mix_table.
-
#rest ⇒ Object
Returns the value of attribute rest.
-
#strings ⇒ Object
Returns the value of attribute strings.
-
#text ⇒ Object
Returns the value of attribute text.
-
#transpose ⇒ Object
Returns the value of attribute transpose.
-
#tuplet ⇒ Object
Returns the value of attribute tuplet.
Instance Method Summary collapse
- #add_effect(effect) ⇒ Object
- #has_effect?(effect) ⇒ Boolean
-
#initialize ⇒ Beat
constructor
A new instance of Beat.
Constructor Details
#initialize ⇒ Beat
Returns a new instance of Beat.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/guitar_pro_parser/beat.rb', line 16 def initialize # Initialize attributes by default values @dotted = false @mix_table = nil @rest = nil @duration = :eighth @tuplet = nil @chord_diagram = nil @text = nil @effects = {} @strings = {} @transpose = nil end |
Instance Attribute Details
#chord_diagram ⇒ Object
Returns the value of attribute chord_diagram.
5 6 7 |
# File 'lib/guitar_pro_parser/beat.rb', line 5 def chord_diagram @chord_diagram end |
#dotted ⇒ Object
Returns the value of attribute dotted.
5 6 7 |
# File 'lib/guitar_pro_parser/beat.rb', line 5 def dotted @dotted end |
#duration ⇒ Object
Returns the value of attribute duration.
5 6 7 |
# File 'lib/guitar_pro_parser/beat.rb', line 5 def duration @duration end |
#effects ⇒ Object
Returns the value of attribute effects.
5 6 7 |
# File 'lib/guitar_pro_parser/beat.rb', line 5 def effects @effects end |
#mix_table ⇒ Object
Returns the value of attribute mix_table.
5 6 7 |
# File 'lib/guitar_pro_parser/beat.rb', line 5 def mix_table @mix_table end |
#rest ⇒ Object
Returns the value of attribute rest.
5 6 7 |
# File 'lib/guitar_pro_parser/beat.rb', line 5 def rest @rest end |
#strings ⇒ Object
Returns the value of attribute strings.
5 6 7 |
# File 'lib/guitar_pro_parser/beat.rb', line 5 def strings @strings end |
#text ⇒ Object
Returns the value of attribute text.
5 6 7 |
# File 'lib/guitar_pro_parser/beat.rb', line 5 def text @text end |
#transpose ⇒ Object
Returns the value of attribute transpose.
5 6 7 |
# File 'lib/guitar_pro_parser/beat.rb', line 5 def transpose @transpose end |
#tuplet ⇒ Object
Returns the value of attribute tuplet.
5 6 7 |
# File 'lib/guitar_pro_parser/beat.rb', line 5 def tuplet @tuplet end |
Instance Method Details
#add_effect(effect) ⇒ Object
36 37 38 |
# File 'lib/guitar_pro_parser/beat.rb', line 36 def add_effect(effect) @effects[effect] = nil end |
#has_effect?(effect) ⇒ Boolean
32 33 34 |
# File 'lib/guitar_pro_parser/beat.rb', line 32 def has_effect?(effect) @effects.include?(effect) end |