Class: AePageObjects::Application

Inherits:
Object
  • Object
show all
Includes:
Configurable
Defined in:
lib/ae_page_objects/core/application.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeApplication

Returns a new instance of Application.



20
21
22
23
24
25
# File 'lib/ae_page_objects/core/application.rb', line 20

def initialize
  ActiveSupport::Dependencies.autoload_paths.unshift(*all_autoload_paths)

  # Freeze so future modifications will fail rather than do nothing mysteriously
  config.eager_load_paths.freeze
end

Class Method Details

.inherited(application_class) ⇒ Object



10
11
12
13
# File 'lib/ae_page_objects/core/application.rb', line 10

def inherited(application_class)
  super
  application_class.parent.send(:include, ConstantResolver)
end

Instance Method Details

#all_autoload_pathsObject



35
36
37
# File 'lib/ae_page_objects/core/application.rb', line 35

def all_autoload_paths
  @all_autoload_paths ||= config.eager_load_paths.uniq
end

#configObject



27
28
29
# File 'lib/ae_page_objects/core/application.rb', line 27

def config
  @config ||= Configuration.new(self)
end

#initialize!Object



31
32
33
# File 'lib/ae_page_objects/core/application.rb', line 31

def initialize!
  eager_load!
end