Class: Musa::MusicXML::Builder::Internal::PartGroup
- Inherits:
-
Object
- Object
- Musa::MusicXML::Builder::Internal::PartGroup
- Includes:
- Helper, Helper::HeaderToXML
- Defined in:
- lib/musa-dsl/musicxml/builder/part-group.rb
Instance Attribute Summary collapse
-
#abbreviation ⇒ Object
Returns the value of attribute abbreviation.
-
#group_barline ⇒ Object
Returns the value of attribute group_barline.
-
#group_time ⇒ Object
Returns the value of attribute group_time.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#symbol ⇒ Object
Returns the value of attribute symbol.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #_header_to_xml(io, indent:, tabs:) ⇒ Object
-
#initialize(number = nil, type:, name: nil, abbreviation: nil, symbol: nil, group_barline: nil, group_time: nil) ⇒ PartGroup
constructor
number.
Methods included from Helper::HeaderToXML
Constructor Details
#initialize(number = nil, type:, name: nil, abbreviation: nil, symbol: nil, group_barline: nil, group_time: nil) ⇒ PartGroup
number
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/musa-dsl/musicxml/builder/part-group.rb', line 11 def initialize(number = nil, # number type:, name: nil, abbreviation: nil, symbol: nil, group_barline: nil, # true group_time: nil) # true @number = number @type = type @name = name @abbreviation = abbreviation @symbol = symbol @group_barline = @group_time = group_time end |
Instance Attribute Details
#abbreviation ⇒ Object
Returns the value of attribute abbreviation.
27 28 29 |
# File 'lib/musa-dsl/musicxml/builder/part-group.rb', line 27 def abbreviation @abbreviation end |
#group_barline ⇒ Object
Returns the value of attribute group_barline.
27 28 29 |
# File 'lib/musa-dsl/musicxml/builder/part-group.rb', line 27 def @group_barline end |
#group_time ⇒ Object
Returns the value of attribute group_time.
27 28 29 |
# File 'lib/musa-dsl/musicxml/builder/part-group.rb', line 27 def group_time @group_time end |
#name ⇒ Object
Returns the value of attribute name.
27 28 29 |
# File 'lib/musa-dsl/musicxml/builder/part-group.rb', line 27 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
27 28 29 |
# File 'lib/musa-dsl/musicxml/builder/part-group.rb', line 27 def number @number end |
#symbol ⇒ Object
Returns the value of attribute symbol.
27 28 29 |
# File 'lib/musa-dsl/musicxml/builder/part-group.rb', line 27 def symbol @symbol end |
#type ⇒ Object
Returns the value of attribute type.
27 28 29 |
# File 'lib/musa-dsl/musicxml/builder/part-group.rb', line 27 def type @type end |
Instance Method Details
#_header_to_xml(io, indent:, tabs:) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/musa-dsl/musicxml/builder/part-group.rb', line 29 def _header_to_xml(io, indent:, tabs:) io.puts "#{tabs}<part-group#{ decode_bool_or_string_attribute(@number&.to_i, 'number') } type=\"#{@type}\">" io.puts "#{tabs}\t<group-name>#{@name}</group-name>" if @name io.puts "#{tabs}\t<group-abbreviation>#{@abbreviation}</group-abbreviation>" if @abbreviation io.puts "#{tabs}\t<group-symbol>#{@symbol}</group-symbol>" if @symbol io.puts "#{tabs}\t<group-barline>#{decode_bool_or_string_value(@group_barline, 'yes', 'no')}</group-barline>" if @group_barline io.puts "#{tabs}\t<group-time>#{decode_bool_or_string_value(@group_time, 'yes', 'no')}</group-time>" if @group_time io.puts "#{tabs}</part-group>" end |