Class: Lydown::Parsing::VoiceSelector
- Defined in:
- lib/lydown/parsing/nodes.rb
Instance Method Summary collapse
Methods inherited from Root
Methods included from RootMethods
#_to_stream, #add_event, #each_child, #event_hash
Constructor Details
This class inherits a constructor from Lydown::Parsing::Root
Instance Method Details
#to_stream(stream, opts) ⇒ Object
396 397 398 399 |
# File 'lib/lydown/parsing/nodes.rb', line 396 def to_stream(stream, opts) voice = (text_value =~ /^([1234])/) && $1.to_i stream << {type: :voice_select, voice: voice} end |