Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/tiny_template/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#parse(context = nil) ⇒ Object Also known as: ~



2
3
4
5
6
7
8
9
10
# File 'lib/tiny_template/core_ext.rb', line 2

def parse(context = nil)
  unless context
    RubyVM::DebugInspector.open do |inspector|
      context = eval('self', inspector.frame_binding(2))
    end
  end

  TinyTemplate(self, context)
end