Class: Quandl::Cassandra::Configuration
- Inherits:
-
Object
- Object
- Quandl::Cassandra::Configuration
- Defined in:
- lib/quandl/cassandra/configuration.rb
Instance Attribute Summary collapse
-
#batch_size ⇒ Object
Returns the value of attribute batch_size.
-
#consistency ⇒ Object
Returns the value of attribute consistency.
-
#hosts ⇒ Object
Returns the value of attribute hosts.
-
#keyspace ⇒ Object
Returns the value of attribute keyspace.
-
#read_consistency ⇒ Object
Returns the value of attribute read_consistency.
-
#write_consistency ⇒ Object
Returns the value of attribute write_consistency.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
21 22 23 24 25 26 27 |
# File 'lib/quandl/cassandra/configuration.rb', line 21 def initialize @hosts = ['localhost'] @consistency = :all @read_consistency = :one @write_consistency = :one @batch_size = 35 * 4 end |
Instance Attribute Details
#batch_size ⇒ Object
Returns the value of attribute batch_size.
19 20 21 |
# File 'lib/quandl/cassandra/configuration.rb', line 19 def batch_size @batch_size end |
#consistency ⇒ Object
Returns the value of attribute consistency.
19 20 21 |
# File 'lib/quandl/cassandra/configuration.rb', line 19 def consistency @consistency end |
#hosts ⇒ Object
Returns the value of attribute hosts.
19 20 21 |
# File 'lib/quandl/cassandra/configuration.rb', line 19 def hosts @hosts end |
#keyspace ⇒ Object
Returns the value of attribute keyspace.
19 20 21 |
# File 'lib/quandl/cassandra/configuration.rb', line 19 def keyspace @keyspace end |
#read_consistency ⇒ Object
Returns the value of attribute read_consistency.
19 20 21 |
# File 'lib/quandl/cassandra/configuration.rb', line 19 def read_consistency @read_consistency end |
#write_consistency ⇒ Object
Returns the value of attribute write_consistency.
19 20 21 |
# File 'lib/quandl/cassandra/configuration.rb', line 19 def write_consistency @write_consistency end |
Instance Method Details
#attributes ⇒ Object
29 30 31 |
# File 'lib/quandl/cassandra/configuration.rb', line 29 def attributes { hosts: hosts, consistency: consistency, keyspace: keyspace, batch_size: batch_size } end |
#to_h ⇒ Object
33 34 35 |
# File 'lib/quandl/cassandra/configuration.rb', line 33 def to_h attributes end |