Class: SearchRequest
- Inherits:
-
Object
- Object
- SearchRequest
- Includes:
- AttributesReader
- Defined in:
- lib/search_request.rb
Instance Method Summary collapse
- #body ⇒ Object
-
#index(index) ⇒ Object
sets index.
-
#index_expr ⇒ Object
returns index.
-
#initialize ⇒ SearchRequest
constructor
A new instance of SearchRequest.
-
#source(source) ⇒ Object
sets source.
-
#source_expr ⇒ Object
returns source.
Methods included from AttributesReader
Constructor Details
#initialize ⇒ SearchRequest
Returns a new instance of SearchRequest.
4 5 6 7 |
# File 'lib/search_request.rb', line 4 def initialize @index = '' @body = nil end |
Instance Method Details
#body ⇒ Object
9 10 11 |
# File 'lib/search_request.rb', line 9 def body return @source.body end |
#index(index) ⇒ Object
sets index
18 19 20 21 |
# File 'lib/search_request.rb', line 18 def index index @index= index return self end |
#index_expr ⇒ Object
returns index
14 15 16 |
# File 'lib/search_request.rb', line 14 def index_expr return @index end |
#source(source) ⇒ Object
sets source
28 29 30 31 |
# File 'lib/search_request.rb', line 28 def source source @source = source return self end |
#source_expr ⇒ Object
returns source
24 25 26 |
# File 'lib/search_request.rb', line 24 def source_expr return @body end |