Class: Navfund::PhilippineSavingsBank
- Defined in:
- lib/navfund/providers/philippine_savings_bank.rb
Constant Summary collapse
- MAIN_URL =
List of funds
"http://www.uitf.com.ph/daily_navpu.php?bank_id=32"
- Funds =
[ {:name => "PSBANK MONEY MARKET FUND", :currency => "PHP", :ticker => ""} ]
Instance Attribute Summary
Attributes inherited from Provider
Instance Method Summary collapse
-
#initialize(main_url = nil) ⇒ PhilippineSavingsBank
constructor
A new instance of PhilippineSavingsBank.
-
#value(fund, fund_type = nil) ⇒ Object
Fetch the current value.
- #value_at ⇒ Object
Methods inherited from Provider
#fund_names, #fund_values, #scrape, strip_value, #uitf_com_ph_date_parser, #uitf_com_ph_parser, #valid_fund?
Constructor Details
#initialize(main_url = nil) ⇒ PhilippineSavingsBank
Returns a new instance of PhilippineSavingsBank.
11 12 13 14 15 |
# File 'lib/navfund/providers/philippine_savings_bank.rb', line 11 def initialize(main_url=nil) @url = main_url ||= MAIN_URL @funds = Funds scrape end |
Instance Method Details
#value(fund, fund_type = nil) ⇒ Object
Fetch the current value
18 19 20 |
# File 'lib/navfund/providers/philippine_savings_bank.rb', line 18 def value(fund, fund_type=nil) uitf_com_ph_parser(fund) end |
#value_at ⇒ Object
22 23 24 |
# File 'lib/navfund/providers/philippine_savings_bank.rb', line 22 def value_at uitf_com_ph_date_parser end |