Sha256: 168af325c71cebdbe7ce1dd30a982fc5ac88d08fc5a445ffc47f8d1de8a7d8f9
Contents?: true
Size: 699 Bytes
Versions: 4
Compression:
Stored size: 699 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
4 entries across 4 versions & 1 rubygems