Class: Navfund::Provider

Inherits:
Object
  • Object
show all
Defined in:
lib/navfund/provider.rb,
lib/navfund/exceptions.rb

Direct Known Subclasses

Metrobank, Philamlife, Sunlife

Defined Under Namespace

Classes: InvalidFund

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.strip_value(val) ⇒ Object



15
16
17
# File 'lib/navfund/provider.rb', line 15

def self.strip_value(val)
  val.strip.gsub('PHP', '').gsub('USD', '').strip
end

Instance Method Details

#scrapeObject



6
7
8
9
10
11
12
13
# File 'lib/navfund/provider.rb', line 6

def scrape
  @document = open(@url).read
  @wrapped_document = Nokogiri::HTML(@document)
  if @vul_url
    @vul_document = open(@vul_url).read
    @wrapped_vul_document = Nokogiri::HTML(@vul_document)
  end
end

#valid_fund?(fund) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/navfund/provider.rb', line 19

def valid_fund?(fund)
  false
end