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 ⇒ Object
-
#initialize(type = nil, options = {}) ⇒ Adapter
constructor
A new instance of Adapter.
Constructor Details
#initialize(type = nil, options = {}) ⇒ Adapter
Returns a new instance of Adapter.
8 9 10 11 12 13 14 |
# File 'lib/juvet/configuration/adapter.rb', line 8 def initialize(type=nil, ={}) opts = ( || {}).dup @type = type || :null @options = opts @class_name = Juvet::String.new("#{self.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 @options 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 |