Class: Solr::Query::HttpRequestBuilder
- Inherits:
-
Object
- Object
- Solr::Query::HttpRequestBuilder
- Defined in:
- lib/solr/query/http_request_builder.rb
Constant Summary collapse
- PATH =
'/select'.freeze
Instance Attribute Summary collapse
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
-
#start ⇒ Object
readonly
Returns the value of attribute start.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(query:, start:, rows:) ⇒ HttpRequestBuilder
constructor
A new instance of HttpRequestBuilder.
Constructor Details
#initialize(query:, start:, rows:) ⇒ HttpRequestBuilder
Returns a new instance of HttpRequestBuilder.
14 15 16 17 18 |
# File 'lib/solr/query/http_request_builder.rb', line 14 def initialize(query:, start:, rows:) @query = query @rows = rows @start = start end |
Instance Attribute Details
#query ⇒ Object (readonly)
Returns the value of attribute query.
8 9 10 |
# File 'lib/solr/query/http_request_builder.rb', line 8 def query @query end |
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
8 9 10 |
# File 'lib/solr/query/http_request_builder.rb', line 8 def rows @rows end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
8 9 10 |
# File 'lib/solr/query/http_request_builder.rb', line 8 def start @start end |
Class Method Details
.call(opts) ⇒ Object
10 11 12 |
# File 'lib/solr/query/http_request_builder.rb', line 10 def self.call(opts) new(**opts).call end |
Instance Method Details
#call ⇒ Object
20 21 22 23 24 |
# File 'lib/solr/query/http_request_builder.rb', line 20 def call Solr::Request::HttpRequest.new(path: PATH, body: build_body, method: :post) end |