Class: Fluxiom::Account
Instance Method Summary collapse
- #assets ⇒ Object
-
#initialize(options = {}) ⇒ Account
constructor
A new instance of Account.
Methods inherited from Fluxiom
Constructor Details
#initialize(options = {}) ⇒ Account
Returns a new instance of Account.
2 3 4 5 6 7 8 |
# File 'lib/fluxapi/account.rb', line 2 def initialize( = {}) self.class.call('/api/account.xml')['account'].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 |