Class: Musa::MusicXML::Builder::Internal::Backup

Inherits:
Object
  • Object
show all
Includes:
Helper::ToXML
Defined in:
lib/musa-dsl/musicxml/builder/backup-forward.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helper::ToXML

#to_xml

Constructor Details

#initialize(duration) ⇒ Backup

Returns a new instance of Backup.



10
11
12
# File 'lib/musa-dsl/musicxml/builder/backup-forward.rb', line 10

def initialize(duration)
  @duration = duration
end

Instance Attribute Details

#durationObject

Returns the value of attribute duration.



14
15
16
# File 'lib/musa-dsl/musicxml/builder/backup-forward.rb', line 14

def duration
  @duration
end

Instance Method Details

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



16
17
18
# File 'lib/musa-dsl/musicxml/builder/backup-forward.rb', line 16

def _to_xml(io, indent:, tabs:)
  io.puts "#{tabs}<backup><duration>#{@duration.to_i}</duration></backup>"
end