Class: Eql::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/eql/config.rb

Overview

Config class holds rendering settings

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig



12
13
14
15
# File 'lib/eql/config.rb', line 12

def initialize
  @adapter         = :active_record
  @cache_templates = true
end

Instance Attribute Details

#adapterSymbol



9
10
11
# File 'lib/eql/config.rb', line 9

def adapter
  @adapter
end

#cache_templates=(value) ⇒ Object (writeonly)

Sets the attribute cache_templates



10
11
12
# File 'lib/eql/config.rb', line 10

def cache_templates=(value)
  @cache_templates = value
end

#pathString



7
8
9
# File 'lib/eql/config.rb', line 7

def path
  @path
end

Instance Method Details

#cache_templates?Boolean

Should templates be cached?



22
23
24
# File 'lib/eql/config.rb', line 22

def cache_templates?
  @cache_templates
end

#default_adapterEql::Adapters::Base



36
37
38
39
# File 'lib/eql/config.rb', line 36

def default_adapter
  return unless adapter
  @default_adapter ||= AdapterFactory.adapters[adapter]
end