Class: MusicalScore::Note::Notation::Tie
- Inherits:
-
ElementBase
- Object
- ElementBase
- MusicalScore::Note::Notation::Tie
- Includes:
- Contracts
- Defined in:
- lib/musical_score/note/notation/tie.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #export_xml ⇒ Object
-
#initialize(type) ⇒ Tie
constructor
A new instance of Tie.
Methods inherited from ElementBase
Constructor Details
#initialize(type) ⇒ Tie
Returns a new instance of Tie.
9 10 11 |
# File 'lib/musical_score/note/notation/tie.rb', line 9 def initialize(type) @type = type.to_sym end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/musical_score/note/notation/tie.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/tie.rb', line 13 def export_xml tie_element = REXML::Element.new('tied') tie_element.add_attribute('type',@type.to_s) return tie_element end |