Class: Tongo::Generator

Inherits:
Object
  • Object
show all
Defined in:
lib/tongo/generator.rb

Constant Summary collapse

TOKENIZER =
/(\%\{.+?\})/
INTERPOLATION =
/\%\{(.+?)\}/

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Generator

Returns a new instance of Generator.



11
12
# File 'lib/tongo/generator.rb', line 11

def initialize(options = {})
end

Instance Method Details

#call(exp) ⇒ Object



7
8
9
# File 'lib/tongo/generator.rb', line 7

def call(exp)
  "\"#{compile!(exp)}\""
end