Class: IEX::Resources::Dividends
- Defined in:
- lib/iex/resources/dividends.rb
Instance Method Summary collapse
-
#initialize(data) ⇒ Dividends
constructor
A new instance of Dividends.
Methods inherited from Resource
float_to_percentage, percentage_to_string, to_dollar
Constructor Details
#initialize(data) ⇒ Dividends
Returns a new instance of 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 |