Class: Cero::Adapter
- Inherits:
-
Object
- Object
- Cero::Adapter
- Defined in:
- lib/cero/adapter.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
{ type: :memory }
- @@types =
[:memory, :sql, :key_value, :document].freeze
- @@backends =
{ memory: [], sql: [:sequel, :active_record], key_value: [], document: [] }.freeze
Instance Attribute Summary collapse
-
#backend ⇒ Object
readonly
Returns the value of attribute backend.
-
#proxy ⇒ Object
readonly
Returns the value of attribute proxy.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Adapter
constructor
A new instance of Adapter.
- #resolve_for(collection_name) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Adapter
Returns a new instance of Adapter.
20 21 22 23 24 |
# File 'lib/cero/adapter.rb', line 20 def initialize( = {}) = DEFAULT_OPTIONS.merge() () self end |
Instance Attribute Details
#backend ⇒ Object (readonly)
Returns the value of attribute backend.
18 19 20 |
# File 'lib/cero/adapter.rb', line 18 def backend @backend end |
#proxy ⇒ Object (readonly)
Returns the value of attribute proxy.
18 19 20 |
# File 'lib/cero/adapter.rb', line 18 def proxy @proxy end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
18 19 20 |
# File 'lib/cero/adapter.rb', line 18 def type @type end |