Class: Cambridge::Tokens::String
- Defined in:
- lib/cambridge/tokens/string.rb
Instance Method Summary collapse
-
#initialize(string) ⇒ String
constructor
A new instance of String.
- #to_ruby ⇒ Object
Methods inherited from Base
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_ruby ⇒ Object
8 9 10 |
# File 'lib/cambridge/tokens/string.rb', line 8 def to_ruby "@stack.push #{@string.inspect}" end |