Class: Navfund::BDO

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

Constant Summary collapse

MAIN_URL =

List of funds

"http://www.uitf.com.ph/daily_navpu.php?bank_id=6"
Funds =
[
{:name => "INSTITUTIONAL CASH RESERVE FUND", :currency => "PHP", :ticker => "BDOICRF:PM"}, 
{:name => "PESO MONEY MARKET FUND", :currency => "PHP", :ticker => "BDOPMMF:PM"},
{:name => "MERIT FUND SHORT TERM PORTFOLIO", :currency => "PHP", :ticker => "EPCIBME:PM"},
{:name => "GS FUND", :currency => "PHP", :ticker => "EPCIBGS:PM"},
{:name => "MERIT FUND MEDIUM TERM PORTFOLIO", :currency => "PHP", :ticker => "BDOMERB:PM"},
{:name => "PESO BOND FUND", :currency => "PHP", :ticker => "BDOPBF:PM"},
{:name => "PESO FIXED INCOME FUND", :currency => "PHP", :ticker => "BDOPFIF:PM"},
{:name => "PESO BALANCED FUND", :currency => "PHP", :ticker => "BDOPBAL:PM"},
{:name => "EQUITY FUND", :currency => "PHP", :ticker => "EPCIBEQ:PM"},
{:name => "FOCUSED EQUITY FUND", :currency => "PHP", :ticker => "BDOTFEF:PM"},
{:name => "INSTITUTIONAL EQUITY FUND", :currency => "PHP", :ticker => "BDOEQTY:PM"},
{:name => "SUSTAINABLE DIVIDEND FUND", :currency => "PHP", :ticker => "BDOTSDF:PM"},
{:name => "DOLLAR MONEY MARKET FUND", :currency => "USD", :ticker => "BDODMMF:PM"},
{:name => "DOLLAR BOND FUND", :currency => "USD", :ticker => "BDODBF:PM"},
{:name => "MEDIUM TERM DOLLAR BOND FUND", :currency => "USD", :ticker => "EPCIBUS:PM"}
]

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

Returns a new instance of BDO.



25
26
27
28
29
# File 'lib/navfund/providers/bdo_unibank.rb', line 25

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



32
33
34
# File 'lib/navfund/providers/bdo_unibank.rb', line 32

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

#value_atObject



36
37
38
# File 'lib/navfund/providers/bdo_unibank.rb', line 36

def value_at
  uitf_com_ph_date_parser
end