Class: Beatport::Price

Inherits:
Money
  • Object
show all
Defined in:
lib/beatport/price.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Price

Returns a new instance of Price.



26
27
28
29
30
31
32
33
# File 'lib/beatport/price.rb', line 26

def initialize(*args)
  if args[0].is_a?(Hash)
    data = args[0]
    super(data['value'] || 0, data['code'])
  else
    super(*args)
  end
end