Class: Teleportd::Search
- Inherits:
-
Object
- Object
- Teleportd::Search
- Includes:
- Enumerable
- Defined in:
- lib/teleportd/search.rb
Instance Attribute Summary collapse
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Class Method Summary collapse
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(opts = {}) ⇒ Search
constructor
A new instance of Search.
- #results ⇒ Object
Constructor Details
Instance Attribute Details
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
11 12 13 |
# File 'lib/teleportd/search.rb', line 11 def opts @opts end |
Class Method Details
.potential_available_filters ⇒ Object
6 7 8 |
# File 'lib/teleportd/search.rb', line 6 def potential_available_filters [:location, :textual_search, :time_period, :size_filter, :from_filter, :sort_filter] end |
Instance Method Details
#each ⇒ Object
22 23 24 |
# File 'lib/teleportd/search.rb', line 22 def each results.each {|member| yield member} end |
#results ⇒ Object
18 19 20 |
# File 'lib/teleportd/search.rb', line 18 def results @results ||= parsed_response["hits"].map{|r|SearchResult.new(r)} end |