Class: Easyrb::Local

Inherits:
Object
  • Object
show all
Defined in:
lib/easyrb/local.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context, hash) ⇒ Local

# Constructor #

#


19
20
21
22
# File 'lib/easyrb/local.rb', line 19

def initialize(context, hash)
  @context = context
  @hash    = hash || Hash.new
end

Instance Attribute Details

#contextObject (readonly)

# Declarations #

#


11
12
13
# File 'lib/easyrb/local.rb', line 11

def context
  @context
end

#hashObject (readonly)

# Declarations #

#


11
12
13
# File 'lib/easyrb/local.rb', line 11

def hash
  @hash
end

Class Method Details

.[](context, hash) ⇒ Object

# Class Methods #

#


30
31
32
# File 'lib/easyrb/local.rb', line 30

def self.[](context, hash)
  new(context, hash).generate_binding
end

Instance Method Details

#generate_bindingObject

# Instance Methods #

#


40
41
42
# File 'lib/easyrb/local.rb', line 40

def generate_binding
  locals_function.(*values)
end