class RouteTranslator::Route

Attributes

mapping[R]
name[R]
options[R]
options_constraints[R]
path[R]
route_set[R]

Public Class Methods

new(route_set, path, name, options_constraints, options, mapping) click to toggle source
# File lib/route_translator/route.rb, line 7
def initialize(route_set, path, name, options_constraints, options, mapping)
  @route_set           = route_set
  @path                = path
  @name                = name
  @options_constraints = options_constraints
  @options             = options
  @mapping             = mapping
end

Public Instance Methods

scope() click to toggle source
# File lib/route_translator/route.rb, line 16
def scope
  @scope ||=
    if mapping.defaults[:controller]
      %i[routes controllers].push mapping.defaults[:controller]
    else
      %i[routes controllers]
    end
end