Sha256: 338142619f11b9cc198ff5c29b681cf2a6d20adfa5f66b0a81d70373af50a736

Contents?: true

Size: 743 Bytes

Versions: 1

Compression:

Stored size: 743 Bytes

Contents

require 'mr_yahoo_finance/profit_and_loss'
require 'mr_yahoo_finance/builder/format'
require 'mr_yahoo_finance/builder/html'
require 'mr_yahoo_finance/builder/validator'
require 'mr_yahoo_finance/config/config'
require 'mr_yahoo_finance/config/indicator'
require 'mr_yahoo_finance/config/url'
require 'mr_yahoo_finance/config/version'


module MrYahooFinance

  def self.get(symbol)
    mr_yahoo_finance = MrYahooFinance.new(symbol)
    mr_yahoo_finance.fetch
  end

  class MrYahooFinance
    def initialize(symbol)
      @symbol = symbol
    end

    def fetch
      {}.tap do |data|
        data[:annual]    = ProfitAndLoss.get(@symbol, :annual)
        data[:quarterly] = ProfitAndLoss.get(@symbol, :quarterly)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mr_yahoo_finance-0.1.0 lib/mr_yahoo_finance.rb