Class: ActiveSearch::Proxy
- Inherits:
-
Object
- Object
- ActiveSearch::Proxy
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/activesearch/proxy.rb
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(results_set, text, options) ⇒ Proxy
constructor
A new instance of Proxy.
Constructor Details
#initialize(results_set, text, options) ⇒ Proxy
Returns a new instance of Proxy.
11 12 13 14 15 |
# File 'lib/activesearch/proxy.rb', line 11 def initialize(results_set, text, ) @results_set = results_set @text = text = end |
Instance Method Details
#each(&block) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/activesearch/proxy.rb', line 17 def each(&block) @results_set.results.map do |result| _result = @results_set.parse(result) block.call(Result.new(_result, @text, )) end end |