Class: Ristretta::Configuration
- Inherits:
-
Object
- Object
- Ristretta::Configuration
- Defined in:
- lib/ristretta/configuration.rb
Instance Attribute Summary collapse
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#redis_client ⇒ Object
Returns the value of attribute redis_client.
-
#subject_id_method ⇒ Object
Returns the value of attribute subject_id_method.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #client ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 |
# File 'lib/ristretta/configuration.rb', line 8 def initialize @version = "1" @namespace = "ristretta" @subject_id_method = :id end |
Instance Attribute Details
#namespace ⇒ Object
Returns the value of attribute namespace.
3 4 5 |
# File 'lib/ristretta/configuration.rb', line 3 def namespace @namespace end |
#redis_client ⇒ Object
Returns the value of attribute redis_client.
3 4 5 |
# File 'lib/ristretta/configuration.rb', line 3 def redis_client @redis_client end |
#subject_id_method ⇒ Object
Returns the value of attribute subject_id_method.
3 4 5 |
# File 'lib/ristretta/configuration.rb', line 3 def subject_id_method @subject_id_method end |
#version ⇒ Object
Returns the value of attribute version.
3 4 5 |
# File 'lib/ristretta/configuration.rb', line 3 def version @version end |
Instance Method Details
#client ⇒ Object
14 15 16 |
# File 'lib/ristretta/configuration.rb', line 14 def client @client ||= Redis::Namespace.new(namespace.to_sym, redis: redis_client) end |