Class: Musa::MusicXML::Builder::Internal::Harmonic
- Inherits:
-
Object
- Object
- Musa::MusicXML::Builder::Internal::Harmonic
- Defined in:
- lib/musa-dsl/musicxml/builder/note-complexities.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#pitch ⇒ Object
Returns the value of attribute pitch.
Instance Method Summary collapse
- #_to_xml(io, indent:, tabs:) ⇒ Object
-
#initialize(kind: nil, pitch: nil) ⇒ Harmonic
constructor
natural / artificial.
Methods included from Musa::MusicXML::Builder::Internal::Helper::ToXML
Constructor Details
#initialize(kind: nil, pitch: nil) ⇒ Harmonic
natural / artificial
112 113 114 115 116 117 |
# File 'lib/musa-dsl/musicxml/builder/note-complexities.rb', line 112 def initialize(kind: nil, # natural / artificial pitch: nil) # base-pitch / sounding-pitch / touching-pitch @kind = kind @pitch = pitch end |
Instance Attribute Details
#kind ⇒ Object
Returns the value of attribute kind.
119 120 121 |
# File 'lib/musa-dsl/musicxml/builder/note-complexities.rb', line 119 def kind @kind end |
#pitch ⇒ Object
Returns the value of attribute pitch.
119 120 121 |
# File 'lib/musa-dsl/musicxml/builder/note-complexities.rb', line 119 def pitch @pitch end |
Instance Method Details
#_to_xml(io, indent:, tabs:) ⇒ Object
121 122 123 124 125 126 |
# File 'lib/musa-dsl/musicxml/builder/note-complexities.rb', line 121 def _to_xml(io, indent:, tabs:) io.puts "#{tabs}<harmonic>" io.puts "#{tabs}\t<#{@kind} />" if @kind io.puts "#{tabs}\t<#{@pitch} />" if @pitch io.puts "#{tabs}</harmonic>" end |