Class: Lydown::Parsing::Rest
- 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
265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/lydown/parsing/nodes.rb', line 265 def to_stream(stream, opts) rest = event_hash(stream, opts, { type: :rest, raw: text_value, head: text_value[0] }) if text_value =~ /^R(\*([0-9]+))?/ rest[:multiplier] = $2 || '1' end _to_stream(self, rest, opts) stream << rest end |