Class: Lit::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/lit/loader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLoader

Returns a new instance of Loader.



13
14
15
16
17
18
# File 'lib/lit/loader.rb', line 13

def initialize
  self.logger ||= Logger.new($stdout)
  self.logger.info 'initializing Lit' unless ::Rails.env.test?
  self.cache ||= Cache.new
  I18n.backend = I18nBackend.new(self.cache)
end

Instance Attribute Details

#cacheObject

Returns the value of attribute cache.



11
12
13
# File 'lib/lit/loader.rb', line 11

def cache
  @cache
end

#loggerObject

Returns the value of attribute logger.



12
13
14
# File 'lib/lit/loader.rb', line 12

def logger
  @logger
end