Class: CassandraObject::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/cassandra_object/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options)
  options = options.symbolize_keys
  self.servers  = Array.wrap(options[:servers] || "127.0.0.1:9160")
  self.keyspace = options[:keyspace]
  self.thrift_options = (options[:thrift] || {}).symbolize_keys
  self.keyspace_options = (options[:keyspace_options] || {}).symbolize_keys
end

Instance Attribute Details

#keyspaceObject

Returns the value of attribute keyspace.



5
6
7
# File 'lib/cassandra_object/config.rb', line 5

def keyspace
  @keyspace
end

#keyspace_optionsObject

Returns the value of attribute keyspace_options.



5
6
7
# File 'lib/cassandra_object/config.rb', line 5

def keyspace_options
  @keyspace_options
end

#serversObject

Returns the value of attribute servers.



5
6
7
# File 'lib/cassandra_object/config.rb', line 5

def servers
  @servers
end

#thrift_optionsObject

Returns the value of attribute thrift_options.



5
6
7
# File 'lib/cassandra_object/config.rb', line 5

def thrift_options
  @thrift_options
end