Sha256: e38cc2bd0cfc8be3f2e995f1ade2d166e1a9b4a6835a696d522b402af8d71fb4
Contents?: true
Size: 467 Bytes
Versions: 116
Compression:
Stored size: 467 Bytes
Contents
module CassandraObject module Connection extend ActiveSupport::Concern included do class_attribute :connection end module ClassMethods DEFAULT_OPTIONS = { servers: "127.0.0.1:9160", thrift: {} } def establish_connection(spec) spec.reverse_merge!(DEFAULT_OPTIONS) self.connection = Cassandra.new(spec[:keyspace], spec[:servers], spec[:thrift].symbolize_keys!) end end end end
Version data entries
116 entries across 116 versions & 2 rubygems