Class: Konmari::Routes::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/konmari/routes/configuration.rb

Overview

The configuration object holding the necessary data for Loader to do its thing.

Instance Attribute Summary collapse

Instance Attribute Details

#applicationApplication

Returns the application to build these routes for (defaults to Rails.application if using Rails).

Returns:

  • (Application)

    the application to build these routes for (defaults to Rails.application if using Rails)



16
17
18
# File 'lib/konmari/routes/configuration.rb', line 16

def application
  @application || (Object.const_defined?(:Rails) ? Rails.application : nil)
end

#loggerLogger

Returns the logger to use for debugging purposes (optional, defaults to Rails.logger if using Rails).

Returns:

  • (Logger)

    the logger to use for debugging purposes (optional, defaults to Rails.logger if using Rails)



11
12
13
# File 'lib/konmari/routes/configuration.rb', line 11

def logger
  @logger || (Object.const_defined?(:Rails) ? Rails.logger : nil)
end

#routes_pathPathname

Returns the folder containing the routing hierarchy to build.

Returns:

  • (Pathname)

    the folder containing the routing hierarchy to build



7
8
9
# File 'lib/konmari/routes/configuration.rb', line 7

def routes_path
  @routes_path
end