Class: MusicalScore::Note::Type
- Inherits:
-
ElementBase
- Object
- ElementBase
- MusicalScore::Note::Type
- Includes:
- Contracts
- Defined in:
- lib/musical_score/note/type.rb
Constant Summary collapse
- @@size =
%w( 128th 64th 32nd 16th eighth quarter half whole breve )
Instance Attribute Summary collapse
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Method Summary collapse
- #export_xml ⇒ Object
-
#initialize(size) ⇒ Type
constructor
A new instance of Type.
Methods inherited from ElementBase
Constructor Details
#initialize(size) ⇒ Type
Returns a new instance of Type.
20 21 22 |
# File 'lib/musical_score/note/type.rb', line 20 def initialize(size) @size = size end |
Instance Attribute Details
#size ⇒ Object (readonly)
Returns the value of attribute size.
18 19 20 |
# File 'lib/musical_score/note/type.rb', line 18 def size @size end |
Instance Method Details
#export_xml ⇒ Object
24 25 26 |
# File 'lib/musical_score/note/type.rb', line 24 def export_xml return REXML::Element.new('type').add_text(@size.to_s) end |