Sha256: 8321ee7465ccc9155261321a109a08178858024fb5ba24eea607ef013d5256c5
Contents?: true
Size: 690 Bytes
Versions: 1
Compression:
Stored size: 690 Bytes
Contents
require 'rubygems' require '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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
barometer-0.8.0 | lib/barometer/web_services/web_service.rb |