Module: ESearchy::Search::MetaType
- Included in:
- Emails, People
- Defined in:
- lib/esearchy/esearchy.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
121
122
123
|
# File 'lib/esearchy/esearchy.rb', line 121
def method_missing(name, *args)
@engines[name.to_sym]
end
|
Instance Method Details
#[](v) ⇒ Object
129
130
131
|
# File 'lib/esearchy/esearchy.rb', line 129
def [](v)
@engine[v]
end
|
#docs(&block) ⇒ Object
112
113
114
115
116
117
118
119
|
# File 'lib/esearchy/esearchy.rb', line 112
def docs(&block)
@engines.each_key {|e| @documents.concat(@engines[e].documents) }
res = ESearchy::Docs.new(@documents)
res.search
$emails.concat(res.emails)
$results.concat(res.results)
block.call(res) if block_given?
end
|
#maxhits=(v) ⇒ Object
125
126
127
|
# File 'lib/esearchy/esearchy.rb', line 125
def maxhits=(v)
@engines.each_key {|e| @engines[e].maxhits=v}
end
|
#results ⇒ Object
108
109
110
|
# File 'lib/esearchy/esearchy.rb', line 108
def results
$results
end
|