Sha256: 632fd2209f7f3094338bd753b93fa99fa73f28157561f9b5da2d897eb50b8098

Contents?: true

Size: 559 Bytes

Versions: 2

Compression:

Stored size: 559 Bytes

Contents

module Socialization
  class << self
    def cassandra
      @cassandra
    end

    def cassandra=(cassandra)
      @cassandra = cassandra
    end

    def keyspace
      @cas_keyspace
    end

    def keyspace=(keyspace)
      @cas_keyspace = keyspace
    end

    def cassandra_session
      return @cassandra_session if !@cassandra_session.nil?
      @cassandra = Cassandra.cluster if @cassandra.nil?
      @cas_keyspace = 'test' if @cas_keyspace.nil?
      @cassandra_session = @cassandra.connect @cas_keyspace
      @cassandra_session
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
socialization-cassandra-0.0.7.pre.alpha lib/socialization/stores/cassandra/config.rb
socialization-cassandra-0.0.6.pre.alpha lib/socialization/stores/cassandra/config.rb