Class: Echo::Search
Instance Method Summary collapse
- #build_query(options) ⇒ Object
- #fetch(options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Search
constructor
A new instance of Search.
Constructor Details
Instance Method Details
#build_query(options) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/echor/search.rb', line 14 def build_query() raise ArgumentError unless [:q] raise ArgumentError unless Echo.user [:appkey] = Echo.user "/search?#{.to_query}" end |
#fetch(options = {}) ⇒ Object
23 24 25 |
# File 'lib/echor/search.rb', line 23 def fetch(={}) self.class.get(build_query()) end |