Class: CassandraObject::Config
- Inherits:
-
Object
- Object
- CassandraObject::Config
- Defined in:
- lib/cassandra_object/config.rb
Instance Attribute Summary collapse
-
#keyspace ⇒ Object
Returns the value of attribute keyspace.
-
#keyspace_options ⇒ Object
Returns the value of attribute keyspace_options.
-
#servers ⇒ Object
Returns the value of attribute servers.
-
#thrift_options ⇒ Object
Returns the value of attribute thrift_options.
Instance Method Summary collapse
-
#initialize(options) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(options) ⇒ Config
Returns a new instance of Config.
7 8 9 10 11 12 13 |
# File 'lib/cassandra_object/config.rb', line 7 def initialize() = .symbolize_keys self.servers = Array.wrap([:servers] || "127.0.0.1:9160") self.keyspace = [:keyspace] self. = ([:thrift] || {}).symbolize_keys self. = ([:keyspace_options] || {}).symbolize_keys end |
Instance Attribute Details
#keyspace ⇒ Object
Returns the value of attribute keyspace.
5 6 7 |
# File 'lib/cassandra_object/config.rb', line 5 def keyspace @keyspace end |
#keyspace_options ⇒ Object
Returns the value of attribute keyspace_options.
5 6 7 |
# File 'lib/cassandra_object/config.rb', line 5 def @keyspace_options end |
#servers ⇒ Object
Returns the value of attribute servers.
5 6 7 |
# File 'lib/cassandra_object/config.rb', line 5 def servers @servers end |
#thrift_options ⇒ Object
Returns the value of attribute thrift_options.
5 6 7 |
# File 'lib/cassandra_object/config.rb', line 5 def @thrift_options end |