Class: Cambridge::Tokens::String

Inherits:
Base
  • Object
show all
Defined in:
lib/cambridge/tokens/string.rb

Instance Method Summary collapse

Methods inherited from Base

#de_codepoint

Constructor Details

#initialize(string) ⇒ String

Returns a new instance of String.



4
5
6
# File 'lib/cambridge/tokens/string.rb', line 4

def initialize(string)
  @string = unquote de_codepoint string
end

Instance Method Details

#to_rubyObject



8
9
10
# File 'lib/cambridge/tokens/string.rb', line 8

def to_ruby
  "@stack.push #{@string.inspect}"
end