Class: IEX::Resources::Dividends

Inherits:
Resource
  • Object
show all
Defined in:
lib/iex/resources/dividends.rb

Instance Method Summary collapse

Methods inherited from Resource

float_to_percentage, to_dollar

Constructor Details

#initialize(data) ⇒ Dividends


14
15
16
17
18
# File 'lib/iex/resources/dividends.rb', line 14

def initialize(data)
  super  # TODO: require Hashie >= 2.5.8, see https://github.com/intridea/hashie/pull/457

  self['amount_dollar'] = Resource.to_dollar(amount: amount, ignore_cents: false)
end