Class: Musa::MusicXML::Builder::Internal::OctaveShift
- Inherits:
-
DirectionType
- Object
- DirectionType
- Musa::MusicXML::Builder::Internal::OctaveShift
- Includes:
- Helper
- Defined in:
- lib/musa-dsl/musicxml/builder/direction.rb
Instance Method Summary collapse
- #_direction_type_to_xml(io, indent:, tabs:) ⇒ Object
-
#initialize(type, size: nil, &block) ⇒ OctaveShift
constructor
up / down / stop / continue.
Methods included from Extension::AttributeBuilder
#attr_complex_adder_to_array, #attr_complex_adder_to_custom, #attr_complex_builder, #attr_simple_builder, #attr_tuple_adder_to_array, #attr_tuple_adder_to_hash, #attr_tuple_builder
Methods included from Helper::ToXML
Methods included from Extension::With
Constructor Details
#initialize(type, size: nil, &block) ⇒ OctaveShift
up / down / stop / continue
246 247 248 249 250 251 252 253 254 |
# File 'lib/musa-dsl/musicxml/builder/direction.rb', line 246 def initialize(type, # up / down / stop / continue size: nil, # number &block) @type = type @size = size super end |
Instance Method Details
#_direction_type_to_xml(io, indent:, tabs:) ⇒ Object
259 260 261 |
# File 'lib/musa-dsl/musicxml/builder/direction.rb', line 259 def _direction_type_to_xml(io, indent:, tabs:) io.puts "#{tabs}<octave-shift type=\"#{@type}\"#{ decode_bool_or_string_attribute(@size&.to_i, 'size') }/>" end |