Class: EODData::Client::BushelPrice
- Inherits:
-
Object
- Object
- EODData::Client::BushelPrice
- Defined in:
- lib/eod_data/client.rb
Overview
:nodoc:
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(price) ⇒ BushelPrice
constructor
A new instance of BushelPrice.
Constructor Details
#initialize(price) ⇒ BushelPrice
Returns a new instance of BushelPrice.
135 136 137 |
# File 'lib/eod_data/client.rb', line 135 def initialize(price) @price = price end |
Instance Method Details
#call ⇒ Object
139 140 141 142 143 144 |
# File 'lib/eod_data/client.rb', line 139 def call components = @price.strip.split('.') fraction_amount = components[1] || 0 "#{components[0]}.#{fraction_amount}".to_f / 100 end |