Sha256: 39243982e5ae3ed9742f886bb292a5f9f332d2ee029b9018df987344587e45e6
Contents?: true
Size: 769 Bytes
Versions: 10
Compression:
Stored size: 769 Bytes
Contents
require 'rubygems' require 'httparty' $:.unshift(File.dirname(__FILE__)) require 'extensions/httparty' module Barometer # # Web Service Class # # This is a base class for creating web service api-consuming # drivers. Each driver inherits from this class. # # Basically, all a service is required to do is take a query # (ie "Paris") and return it corresponding data class # class WebService # all web_service drivers will use the HTTParty gem include HTTParty # STUB: define this method to actually retireve the data def self.fetch(query=nil); raise NotImplementedError; end private def self._is_a_query?(object=nil) return false unless object object.is_a?(Barometer::Query) end end end
Version data entries
10 entries across 10 versions & 2 rubygems