Class: Twhois::User
- Inherits:
-
Object
- Object
- Twhois::User
- Defined in:
- lib/twhois/user.rb
Overview
Kinda acts like the Hashie gem
Instance Method Summary collapse
-
#initialize(hash) ⇒ User
constructor
A new instance of User.
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 |