Module: Wits::FinalInterimPrices
Defined Under Namespace
Modules: ConvenienceMethods
Constant Summary
Constants included
from PriceCodes
PriceCodes::AVERAGE, PriceCodes::FINAL, PriceCodes::FIVE_MINUTE, PriceCodes::FORECAST, PriceCodes::INTERIM, PriceCodes::PRICE_DESCRIPTION, PriceCodes::PRICE_TYPES
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.extended(base) ⇒ Object
15
16
17
18
|
# File 'lib/wits/final_interim_prices.rb', line 15
def self.extended(base)
base.extend Helpers
base.extend ConvenienceMethods
end
|
Instance Method Details
#forecast_prices(node, date = nz_current_date, type = FORECAST) ⇒ Object
29
30
31
32
|
# File 'lib/wits/final_interim_prices.rb', line 29
def forecast_prices(node, date = nz_current_date, type = FORECAST)
csv = request_prices(node, date, type)
parse_csv(csv, type)
end
|
#interim_prices(node, date = nz_current_date - 1) ⇒ Object
25
26
27
|
# File 'lib/wits/final_interim_prices.rb', line 25
def interim_prices(node, date = nz_current_date - 1)
prices(node, date, INTERIM)
end
|
#prices(node, date = nz_current_date - 3, type = FINAL) ⇒ Object
20
21
22
23
|
# File 'lib/wits/final_interim_prices.rb', line 20
def prices(node, date = nz_current_date - 3, type = FINAL)
csv = request_prices(node, date, type)
parse_csv(csv, type)
end
|