Class: Twhois::User

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

Overview

Kinda acts like the Hashie gem

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ User

Returns a new instance of User.



7
8
9
10
11
12
# File 'lib/twhois/user.rb', line 7

def initialize(hash)
  hash.keys.each do |key|
    self.class.send(:attr_accessor, key.to_sym)
    self.send("#{key}=", hash[key])
  end
end