Class: Manufacturable::Railtie

Inherits:
Object
  • Object
show all
Defined in:
lib/manufacturable/railtie.rb

Class Method Summary collapse

Class Method Details

.loadObject



5
6
7
# File 'lib/manufacturable/railtie.rb', line 5

def self.load
  load_railtie if rails_defined?
end

.load_railtieObject



9
10
11
12
13
# File 'lib/manufacturable/railtie.rb', line 9

def self.load_railtie
  Class.new(Rails::Railtie).initializer('manufacturable.require_paths') do |app|
    Manufacturable::Config.require_method = app.config.eager_load ? :require : :require_dependency
  end
end

.rails_defined?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/manufacturable/railtie.rb', line 15

def self.rails_defined?
  defined?(Rails)
end