Class: EME::Billing::Wallet

Inherits:
ObjectHash show all
Defined in:
lib/eme/billing.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ObjectHash

#method_missing

Constructor Details

#initialize(wallet_hash) ⇒ Wallet

Returns a new instance of Wallet.



413
414
415
416
417
418
419
420
421
422
# File 'lib/eme/billing.rb', line 413

def initialize(wallet_hash)
  @currencies = []
  self[:error] = false
  @currencies << "EMP"
  self[:EMP] = ObjectHash.new
  self[:EMP][:amount] = wallet_hash["TOTREMAINAMT"]
  theDefault = ObjectHash.new
  theDefault[:amount] = 0
  self.default = theDefault
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class EME::Billing::ObjectHash

Instance Attribute Details

#currenciesObject

Returns the value of attribute currencies.



411
412
413
# File 'lib/eme/billing.rb', line 411

def currencies
  @currencies
end