Sha256: 9b7df9823ce5a4f9cbff152674b5a241bb0da5de43b50cae522f1db3a42bc775

Contents?: true

Size: 474 Bytes

Versions: 2

Compression:

Stored size: 474 Bytes

Contents

module CassandraObject
  module Consistency
    extend ActiveSupport::Concern

    module ClassMethods
      def with_consistency(consistency)
        previous, self.default_consistency = default_consistency, consistency
        yield
      ensure
        self.default_consistency = previous
      end

      def default_consistency=(value)
        adapter.consistency = value
      end

      def default_consistency
        adapter.consistency
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gotime-cassandra_object-4.12.0 lib/cassandra_object/consistency.rb
gotime-cassandra_object-4.11.6 lib/cassandra_object/consistency.rb