class FundamentusFetcher
Public Class Methods
new(fetcher, options = {})
click to toggle source
# File lib/fundamentus_data/fundamentus_fetcher.rb, line 3 def initialize(fetcher, options = {}) @fetcher = fetcher if options.has_key?(:verbose) @verbose = options[:verbose] end end
Public Instance Methods
fetch(stock_codes)
click to toggle source
# File lib/fundamentus_data/fundamentus_fetcher.rb, line 10 def fetch(stock_codes) if not stock_codes.is_a?(Array) stock_codes = [stock_codes] end urls = {} stock_codes.each do |code| urls[code] = url_for code end return @fetcher.fetch(urls) end
url_for(code)
click to toggle source
# File lib/fundamentus_data/fundamentus_fetcher.rb, line 21 def url_for(code) 'http://www.fundamentus.com.br/detalhes.php?papel=' + code end