Class: HashBinding

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_hash(h) ⇒ Object


23
24
25
26
27
28
29
# File 'lib/vpnmaker.rb', line 23

def self.from_hash(h)
  hb = self.new
  h.each do |k, v|
    hb.instance_variable_set("@#{k}", v)
  end
  hb
end

Instance Method Details

#bindingObject

normally private


31
# File 'lib/vpnmaker.rb', line 31

def binding; super; end