Class: Binding

Inherits:
Object
  • Object
show all
Defined in:
lib/yarsh/binding.rb

Instance Method Summary collapse

Instance Method Details

#+(other) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/yarsh/binding.rb', line 2

def +(other)
  return self if other.nil?

  other.local_variables.each do |var|
    local_variable_set(var, other.local_variable_get(var))
  end
  self
end