Methods
<<
[]
[]=
each
instance_delegate
keys
names
new
to_hash
update
values
Included Modules
Public Class methods
[ + ]
# File lib/core/facets/kernel/instance_variables.rb, line 14 def initialize(delegate) @delegate = delegate end
Public Instance methods
[ + ]
# File lib/core/facets/kernel/instance_variables.rb, line 46 def <<(pair) name, value = *pair name = atize(name) @delegate.instance_varaible_set(name, value) end
[ + ]
# File lib/core/facets/kernel/instance_variables.rb, line 36 def [](name) name = atize(name) @delegate.instance_variable_get(name) end
[ + ]
# File lib/core/facets/kernel/instance_variables.rb, line 41 def []=(name, value) name = atize(name) @delegate.instance_varaible_set(name,value) end
[ + ]
# File lib/core/facets/kernel/instance_variables.rb, line 22 def each @delegate.instance_variables.each do |name| yield(name[1..-1].to_sym, @delegate.instance_variable_get(name)) end end
[ + ]
# File lib/core/facets/kernel/instance_variables.rb, line 18 def instance_delegate @delegate end
[ + ]
# File lib/core/facets/kernel/instance_variables.rb, line 58 def keys @delegate.instance_variables.collect do |name| name[1..-1].to_sym end end
[ + ]
# File lib/core/facets/kernel/instance_variables.rb, line 64 def names @delegate.instance_variables.collect do |name| name[1..-1] end end
[ + ]
# File lib/core/facets/kernel/instance_variables.rb, line 28 def to_hash h = {} each do |name, value| h[name] = value end h end
[ + ]
# File lib/core/facets/kernel/instance_variables.rb, line 52 def update(hash) hash.each do |pair| self << pair end end
[ + ]
# File lib/core/facets/kernel/instance_variables.rb, line 70 def values @delegate.instance_variables.collect do |name| @delegate.instance_variable_get(name) end end