Module: FoxPage::AppParts::Routes

Extended by:
Base
Included in:
FoxPage::Application
Defined in:
lib/fox_page/app_parts/routes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Base

init, priority

Instance Attribute Details

#routesObject (readonly)

Returns the value of attribute routes.



12
13
14
# File 'lib/fox_page/app_parts/routes.rb', line 12

def routes
  @routes
end

Instance Method Details

#draw_routes(&block) ⇒ Object



14
15
16
17
# File 'lib/fox_page/app_parts/routes.rb', line 14

def draw_routes(&block)
  @routes ||= {}
  @routes.merge!(Router.draw_routes(&block))
end

#reload_routes!Object



19
20
21
22
# File 'lib/fox_page/app_parts/routes.rb', line 19

def reload_routes!
  @routes = {}
  load root.join("config", "routes.rb")
end