Class: Juvet::Configuration::Adapter
- Inherits:
-
Object
- Object
- Juvet::Configuration::Adapter
- Defined in:
- lib/juvet/configuration/adapter.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #build(mapper) ⇒ Object
-
#initialize(options = {}) ⇒ Adapter
constructor
A new instance of Adapter.
Constructor Details
#initialize(options = {}) ⇒ Adapter
8 9 10 11 12 13 14 |
# File 'lib/juvet/configuration/adapter.rb', line 8 def initialize(={}) opts = .merge(( || {})) @type = opts.delete :type = opts @class_name = Juvet::String.new("#{type}_adapter").classify end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
4 5 6 |
# File 'lib/juvet/configuration/adapter.rb', line 4 def class_name @class_name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/juvet/configuration/adapter.rb', line 5 def end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/juvet/configuration/adapter.rb', line 6 def type @type end |
Instance Method Details
#build(mapper) ⇒ Object
16 17 18 19 |
# File 'lib/juvet/configuration/adapter.rb', line 16 def build(mapper) load_adapter instantiate_adapter mapper end |