Class: ShirinjiRails::Railtie

Inherits:
Rails::Railtie
  • Object
show all
Defined in:
lib/shirinji-rails/railtie.rb

Instance Method Summary collapse

Instance Method Details

#init!Object



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/shirinji-rails/railtie.rb', line 13

def init!
  return unless (conf = config_path)

  map = Shirinji::Map.load(conf)
  resolver = Shirinji::Resolver.new(map)

  ActiveSupport::Reloader.to_prepare do
    map = Shirinji::Map.load(conf)
    resolver.reload(map)
  end

  config.shirinji.resolver = resolver
end