Class: Navfund::RCBC

Inherits:
Provider show all
Defined in:
lib/navfund/providers/rcbc.rb

Constant Summary collapse

MAIN_URL =

List of funds

"http://www.uitf.com.ph/daily_navpu.php?bank_id=11"
Funds =
[
{:name => "RIZAL PESO CASH MANAGEMENT FUND", :currency => "PHP", :ticker => ""},
{:name => "RIZAL PESO MONEY MARKET", :currency => "PHP", :ticker => ""},
{:name => "RIZAL PESO BOND FUND", :currency => "PHP", :ticker => ""},
{:name => "RIZAL BALANCED FUND", :currency => "PHP", :ticker => ""},
{:name => "RIZAL EQUITY FUND", :currency => "PHP", :ticker => ""},
{:name => "RIZAL DOLLAR MONEY MARKET", :currency => "USD", :ticker => ""},
{:name => "RIZAL DOLLAR  BOND FUND", :currency => "USD", :ticker => ""},
{:name => "RIZAL GLOBAL EQUITY FEEDER FUND", :currency => "USD", :ticker => ""}
]

Instance Attribute Summary

Attributes inherited from Provider

#funds

Instance Method Summary collapse

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) ⇒ RCBC

Returns a new instance of RCBC.



18
19
20
21
22
# File 'lib/navfund/providers/rcbc.rb', line 18

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



25
26
27
# File 'lib/navfund/providers/rcbc.rb', line 25

def value(fund, fund_type=nil)
  uitf_com_ph_parser(fund)
end

#value_atObject



29
30
31
# File 'lib/navfund/providers/rcbc.rb', line 29

def value_at
  uitf_com_ph_date_parser
end