Class: Musa::MusicXML::Builder::Internal::Dynamics Private
- Defined in:
- lib/musa-dsl/musicxml/builder/direction.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Dynamic marking direction type.
Represents dynamic levels (pp, p, mp, mf, f, ff, fff, etc.). Can specify multiple dynamics for compound markings.
Instance Method Summary collapse
- #_direction_type_to_xml(io, indent:, tabs:) ⇒ Object private
-
#initialize(value, &block) ⇒ Dynamics
constructor
private
pp / ppp / ...
Constructor Details
#initialize(value, &block) ⇒ Dynamics
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
pp / ppp / ... or array of
312 313 314 315 316 |
# File 'lib/musa-dsl/musicxml/builder/direction.rb', line 312 def initialize(value, # pp / ppp / ... or array of &block) @dynamics = value.arrayfy super end |
Instance Method Details
#_direction_type_to_xml(io, indent:, tabs:) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
320 321 322 323 324 325 326 327 328 |
# File 'lib/musa-dsl/musicxml/builder/direction.rb', line 320 def _direction_type_to_xml(io, indent:, tabs:) io.puts "#{tabs}<dynamics>" @dynamics.each do |dynamics| io.puts "#{tabs}\t<#{dynamics} />" end io.puts "#{tabs}</dynamics>" end |