Class: Camping::CommandsHelpers::RouteCollection
- Defined in:
- lib/camping/commands.rb,
lib/camping/commands.rb
Instance Attribute Summary collapse
-
#routes ⇒ Object
Returns the value of attribute routes.
Instance Method Summary collapse
-
#display ⇒ Object
Displays formatted routes from a route collection Assumes that Route structs are stored in :routes.
Instance Attribute Details
#routes ⇒ Object
Returns the value of attribute routes
33 34 35 |
# File 'lib/camping/commands.rb', line 33 def routes @routes end |
Instance Method Details
#display ⇒ Object
Displays formatted routes from a route collection Assumes that Route structs are stored in :routes.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/camping/commands.rb', line 37 def display current_app, current_controller, current_method = "", "", "" puts "App VERB Route" routes.each { |r| if current_app != r.app.to_s current_app = r.app.to_s puts "-----------------------------------" puts r.app_header end if current_controller != r.controller.to_s current_controller = r.controller.to_s puts r.controller_header end puts r. true } end |