Class: MerbFootnotes::Notes::RoutesNote
- Inherits:
-
AbstractNote
- Object
- AbstractNote
- MerbFootnotes::Notes::RoutesNote
- Defined in:
- lib/merb_footnotes/notes/routes_note.rb
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(controller) ⇒ RoutesNote
constructor
A new instance of RoutesNote.
- #legend ⇒ Object
Methods inherited from AbstractNote
close!, #fieldset?, included?, #included?, #javascript, #link, #onclick, #row, start!, #stylesheet, #title, title, #to_sym, to_sym, #valid?
Constructor Details
#initialize(controller) ⇒ RoutesNote
Returns a new instance of RoutesNote.
6 7 8 9 |
# File 'lib/merb_footnotes/notes/routes_note.rb', line 6 def initialize(controller) @controller = controller @parsed_routes = parse_routes || [] end |
Instance Method Details
#content ⇒ Object
15 16 17 |
# File 'lib/merb_footnotes/notes/routes_note.rb', line 15 def content mount_table(@parsed_routes.to_a.unshift([:name, :path, :params])) end |
#legend ⇒ Object
11 12 13 |
# File 'lib/merb_footnotes/notes/routes_note.rb', line 11 def legend "Routes for #{@controller.class.to_s}" end |