Class: Localmotive::Railtie

Inherits:
Rails::Railtie
  • Object
show all
Defined in:
lib/localmotive.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.maybe_load(app, filename) ⇒ Object



6
7
8
9
10
11
# File 'lib/localmotive.rb', line 6

def self.maybe_load(app, filename)
  path = app.root.join('.local/config', filename)
  if path.exist?
    load path
  end
end

Instance Method Details

#maybe_load(app, filename) ⇒ Object



13
14
15
# File 'lib/localmotive.rb', line 13

def maybe_load(app, filename)
  self.class.maybe_load(app, filename)
end