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
120
121
122
|
# File 'lib/esearchy/esearchy.rb', line 120
def method_missing(name, *args)
@engines[name.to_sym]
end
|
Instance Method Details
#[](v) ⇒ Object
128
129
130
|
# File 'lib/esearchy/esearchy.rb', line 128
def [](v)
@engine[v]
end
|
#docs(&block) ⇒ Object
111
112
113
114
115
116
117
118
|
# File 'lib/esearchy/esearchy.rb', line 111
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
124
125
126
|
# File 'lib/esearchy/esearchy.rb', line 124
def maxhits=(v)
@engines.each_key {|e| @engines[e].maxhits=v}
end
|
#results ⇒ Object
107
108
109
|
# File 'lib/esearchy/esearchy.rb', line 107
def results
$results
end
|