lib/currency_spy/scraper_base.rb
def fetch_rates
      if self.class.superclass.eql?(Object)
        raise Exception.new("This method should be invoked from CurrencySpy::Scraper sub class")
      else
        check_currency_code_validity
        rate_results = {}
        RATE_DATA.each do |rate|
          symbol = rate.to_sym
          if self.class.instance_methods.include?(symbol)
            value = self.send(symbol)
            rate_results[symbol] = value unless value.nil?
          end
        end
        rate_results
      end
    end
def fetch_rates
      if self.class.superclass.eql?(Object)
        raise Exception.new("This method should be invoked from CurrencySpy::Scraper sub class")
      else
        check_currency_code_validity
        rate_results = {}
        RATE_DATA.each do |rate|
          symbol = rate.to_sym
          if self.class.instance_methods.include?(symbol)
            value = self.send(symbol)
            rate_results[symbol] = value unless value.nil?
          end
        end
        rate_results
      end
    end
Method which calls all rate fetching methods from the sub class and returns
 a Hash with appropriate values.