Class: Eql::Config
- Inherits:
-
Object
- Object
- Eql::Config
- Defined in:
- lib/eql/config.rb
Overview
Config class holds rendering settings
Instance Attribute Summary collapse
- #adapter ⇒ Object
-
#path ⇒ String
Returns templates root folder.
Instance Method Summary collapse
-
#default_adapter ⇒ Eql::Adapters::Base
Returns default adapter.
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
11 12 13 |
# File 'lib/eql/config.rb', line 11 def initialize @adapter = :active_record end |
Instance Attribute Details
#adapter ⇒ Object
9 10 11 |
# File 'lib/eql/config.rb', line 9 def adapter @adapter end |
#path ⇒ String
Returns templates root folder
7 8 9 |
# File 'lib/eql/config.rb', line 7 def path @path end |
Instance Method Details
#default_adapter ⇒ Eql::Adapters::Base
Returns default adapter
25 26 27 28 |
# File 'lib/eql/config.rb', line 25 def default_adapter return unless adapter @default_adapter ||= AdapterFactory.adapters[adapter] end |