Class: Musa::MusicXML::Builder::Internal::Bracket

Inherits:
DirectionType
  • Object
show all
Includes:
Helper
Defined in:
lib/musa-dsl/musicxml/builder/direction.rb

Instance Method Summary collapse

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

#to_xml

Methods included from Extension::With

#with

Constructor Details

#initialize(type, line_end:, line_type: nil, &block) ⇒ Bracket

start / stop / continue



188
189
190
191
192
193
194
195
196
197
198
# File 'lib/musa-dsl/musicxml/builder/direction.rb', line 188

def initialize(type, # start / stop / continue
               line_end:, # up / down / both / arrow / none
               line_type: nil, # solid / dashed / dotted / wavy
               &block)

  @type = type
  @line_end = line_end
  @line_type = line_type

  super
end

Instance Method Details

#_direction_type_to_xml(io, indent:, tabs:) ⇒ Object



204
205
206
# File 'lib/musa-dsl/musicxml/builder/direction.rb', line 204

def _direction_type_to_xml(io, indent:, tabs:)
  io.puts "#{tabs}<bracket type=\"#{@type}\" line_end=\"#{@line_end}\"#{ decode_bool_or_string_attribute(@line_type, 'line_type') }/>"
end