Class: Elastics::HttpClients::Base
- Inherits:
-
Object
- Object
- Elastics::HttpClients::Base
- Defined in:
- lib/elastics/http_clients/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#base_uri ⇒ Object
Returns the value of attribute base_uri.
-
#options ⇒ Object
Returns the value of attribute options.
-
#raise_proc ⇒ Object
Returns the value of attribute raise_proc.
Instance Method Summary collapse
-
#initialize(base_uri = 'http://localhost:9200', options = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(base_uri = 'http://localhost:9200', options = {}) ⇒ Base
Returns a new instance of Base.
7 8 9 10 11 |
# File 'lib/elastics/http_clients/base.rb', line 7 def initialize(base_uri='http://localhost:9200', ={}) @options = @base_uri = base_uri @raise_proc = proc{|response| response.status >= 400} end |
Instance Attribute Details
#base_uri ⇒ Object
Returns the value of attribute base_uri.
5 6 7 |
# File 'lib/elastics/http_clients/base.rb', line 5 def base_uri @base_uri end |
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/elastics/http_clients/base.rb', line 5 def @options end |
#raise_proc ⇒ Object
Returns the value of attribute raise_proc.
5 6 7 |
# File 'lib/elastics/http_clients/base.rb', line 5 def raise_proc @raise_proc end |