Class: Lydown::Parsing::Silence
- 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
279 280 281 282 283 284 285 286 287 288 |
# File 'lib/lydown/parsing/nodes.rb', line 279 def to_stream(stream, opts) silence = event_hash(stream, opts, { type: :silence, raw: text_value, head: text_value[0] }) if text_value =~ /^S(\*([0-9]+))?/ silence[:multiplier] = $2 || '1' end _to_stream(self, silence, opts) stream << silence end |