Class: ToSource::Command::Token

Inherits:
ToSource::Command show all
Defined in:
lib/to_source/command.rb

Overview

Command that emits token

Constant Summary

Constants inherited from ToSource::Command

NULL

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contentString (readonly)

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.

Return token content

Returns:

  • (String)


31
32
33
# File 'lib/to_source/command.rb', line 31

def content
  @content
end

Instance Method Details

#run(state) ⇒ self

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.

Run command

Parameters:

Returns:

  • (self)


41
42
43
44
# File 'lib/to_source/command.rb', line 41

def run(state)
  state.push(self)
  self
end