Class: Neuron::Client::API
Class Attribute Summary collapse
-
.default_api ⇒ Object
Returns the value of attribute default_api.
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
Instance Method Summary collapse
Class Attribute Details
.default_api ⇒ Object
Returns the value of attribute default_api.
68 69 70 |
# File 'lib/neuron-client/api.rb', line 68 def default_api @default_api end |
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection.
5 6 7 |
# File 'lib/neuron-client/api.rb', line 5 def connection @connection end |
Instance Method Details
#configure {|config| ... } ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/neuron-client/api.rb', line 7 def configure yield config inclusion(config, :connection_type, [:admin, :membase]) configure_admin_connection if config.connection_type == :admin configure_membase_connection if config.connection_type == :membase @validate = (config.validate != false) self end |
#connection_type ⇒ Object
18 19 20 |
# File 'lib/neuron-client/api.rb', line 18 def connection_type @config.connection_type end |
#validate? ⇒ Boolean
22 23 24 |
# File 'lib/neuron-client/api.rb', line 22 def validate? @validate != false end |