Class: Navfund::EastWestBank

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

Constant Summary collapse

MAIN_URL =

List of funds

"http://www.uitf.com.ph/daily_navpu.php?bank_id=8"
Funds =
[
{:name => "Infinity Peso Money Market Fund", :currency => "PHP", :ticker => "EASPMON:PM"},
{:name => "Infinity Peso Intermediate Term Bond Fund", :currency => "PHP", :ticker => ""},
{:name => "Infinity Peso Long Term Bond Fund", :currency => "PHP", :ticker => "EASLTBF:PM"},
{:name => "EastWest PhilEquity Feeder Fund", :currency => "PHP", :ticker => ""},
{:name => "EastWest PhilEquity Institutional Feeder Fund", :currency => "PHP", :ticker => ""},
{:name => "Infinity Dollar Intermediate Term Bond 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) ⇒ EastWestBank

Returns a new instance of EastWestBank.



16
17
18
19
20
# File 'lib/navfund/providers/eastwest_bank.rb', line 16

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



23
24
25
# File 'lib/navfund/providers/eastwest_bank.rb', line 23

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

#value_atObject



27
28
29
# File 'lib/navfund/providers/eastwest_bank.rb', line 27

def value_at
  uitf_com_ph_date_parser
end