Class: Lydown::Parsing::Command

Inherits:
Root
  • Object
show all
Defined in:
lib/lydown/parsing/nodes.rb

Defined Under Namespace

Modules: Argument, Key

Constant Summary collapse

SETTING_KEYS =
%w{time key clef pickup mode nomode}
NON_EPHEMERAL_KEYS =
%w{time key}

Instance Method Summary collapse

Methods inherited from Root

#initialize

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



355
356
357
358
359
360
361
362
# File 'lib/lydown/parsing/nodes.rb', line 355

def to_stream(stream, opts)
  cmd = event_hash(stream, opts, {
    type: :command, raw: text_value
  })
  cmd[:once] = true if text_value =~ /^\\\!/
  _to_stream(self, cmd, opts)
  stream << cmd
end