Class: Fluxiom::Account

Inherits:
Fluxiom show all
Defined in:
lib/fluxapi/account.rb

Instance Method Summary collapse

Methods inherited from Fluxiom

#account, call, #users

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(options = {})
  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

Instance Method Details

#assetsObject



9
10
11
# File 'lib/fluxapi/account.rb', line 9

def assets
  Fluxiom::Assets.new
end