Class: SolidCacheMongoid::Configuration
- Inherits:
-
Object
- Object
- SolidCacheMongoid::Configuration
- Defined in:
- lib/solid_cache_mongoid/configuration.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
-
#database ⇒ Object
readonly
Returns the value of attribute database.
-
#encrypt ⇒ Object
readonly
Returns the value of attribute encrypt.
-
#encryption_context_properties ⇒ Object
readonly
Returns the value of attribute encryption_context_properties.
-
#executor ⇒ Object
readonly
Returns the value of attribute executor.
-
#size_estimate_samples ⇒ Object
readonly
Returns the value of attribute size_estimate_samples.
-
#store_options ⇒ Object
readonly
Returns the value of attribute store_options.
Instance Method Summary collapse
- #encrypt? ⇒ Boolean
-
#initialize(store_options: {}, database: nil, collection: nil, client: nil, executor: nil, encrypt: false, encryption_context_properties: nil, size_estimate_samples: 10_000) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(store_options: {}, database: nil, collection: nil, client: nil, executor: nil, encrypt: false, encryption_context_properties: nil, size_estimate_samples: 10_000) ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/solid_cache_mongoid/configuration.rb', line 7 def initialize( store_options: {}, database: nil, collection: nil, client: nil, executor: nil, encrypt: false, encryption_context_properties: nil, size_estimate_samples: 10_000 ) @store_options = @size_estimate_samples = size_estimate_samples @executor = executor @encrypt = encrypt @client = client @collection = collection || "solid_cache_entries" @database = database || "solid_cache_mongoid" @encryption_context_properties = encryption_context_properties @encryption_context_properties ||= default_encryption_context_properties if encrypt? end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/solid_cache_mongoid/configuration.rb', line 5 def client @client end |
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
5 6 7 |
# File 'lib/solid_cache_mongoid/configuration.rb', line 5 def collection @collection end |
#database ⇒ Object (readonly)
Returns the value of attribute database.
5 6 7 |
# File 'lib/solid_cache_mongoid/configuration.rb', line 5 def database @database end |
#encrypt ⇒ Object (readonly)
Returns the value of attribute encrypt.
5 6 7 |
# File 'lib/solid_cache_mongoid/configuration.rb', line 5 def encrypt @encrypt end |
#encryption_context_properties ⇒ Object (readonly)
Returns the value of attribute encryption_context_properties.
5 6 7 |
# File 'lib/solid_cache_mongoid/configuration.rb', line 5 def encryption_context_properties @encryption_context_properties end |
#executor ⇒ Object (readonly)
Returns the value of attribute executor.
5 6 7 |
# File 'lib/solid_cache_mongoid/configuration.rb', line 5 def executor @executor end |
#size_estimate_samples ⇒ Object (readonly)
Returns the value of attribute size_estimate_samples.
5 6 7 |
# File 'lib/solid_cache_mongoid/configuration.rb', line 5 def size_estimate_samples @size_estimate_samples end |
#store_options ⇒ Object (readonly)
Returns the value of attribute store_options.
5 6 7 |
# File 'lib/solid_cache_mongoid/configuration.rb', line 5 def @store_options end |
Instance Method Details
#encrypt? ⇒ Boolean
22 23 24 |
# File 'lib/solid_cache_mongoid/configuration.rb', line 22 def encrypt? encrypt.present? end |