Class: Binding

Inherits:
Object show all
Defined in:
lib/sup_tag/extensions/binding.rb

Overview

Modify Binding to extract value.

Instance Method Summary collapse

Instance Method Details

#[](name) ⇒ Object

Get the value of a variable of method in this binding.

Parameters:

  • name (Symbol, String)

    Object to get value of.

Returns:



9
10
11
# File 'lib/sup_tag/extensions/binding.rb', line 9

def [](name)
  return eval("lambda { #{name.to_s} }", self).call
end