Class: Fluxiom::User
Instance Method Summary collapse
-
#initialize(data) ⇒ User
constructor
A new instance of User.
Methods inherited from Fluxiom
#account, #assets, call, #users
Constructor Details
#initialize(data) ⇒ User
Returns a new instance of User.
2 3 4 5 6 7 8 |
# File 'lib/fluxapi/user.rb', line 2 def initialize(data) data.each do |k, v| self.instance_variable_set("@#{k}", v) self.class.send(:define_method, k, proc{self.instance_variable_get("@#{k}")}) self.class.send(:define_method, "#{k}=", proc{|v| self.instance_variable_set("@#{k}", v)}) end end |