Class: MusicalScore::Note::Notation::Tuplet
- Inherits:
-
ElementBase
- Object
- ElementBase
- MusicalScore::Note::Notation::Tuplet
- Includes:
- Contracts
- Defined in:
- lib/musical_score/note/notation/tuplet.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #export_xml ⇒ Object
-
#initialize(type) ⇒ Tuplet
constructor
A new instance of Tuplet.
Methods inherited from ElementBase
Constructor Details
#initialize(type) ⇒ Tuplet
Returns a new instance of Tuplet.
9 10 11 |
# File 'lib/musical_score/note/notation/tuplet.rb', line 9 def initialize(type) @type = type end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/musical_score/note/notation/tuplet.rb', line 7 def type @type end |
Instance Method Details
#export_xml ⇒ Object
13 14 15 16 17 18 |
# File 'lib/musical_score/note/notation/tuplet.rb', line 13 def export_xml tuplet_element = REXML::Element.new('tuplet') tuplet_element.add_attribute('type', @type.to_s) return tuplet_element end |