Class: Footnotes::Notes::SinatraRoutesNote
Instance Method Summary
collapse
close!, #has_fieldset?, included?, #javascript, #link, #onclick, #row, start!, #stylesheet, title, #to_sym, to_sym, #valid?
Constructor Details
Returns a new instance of SinatraRoutesNote.
6
7
8
9
|
# File 'lib/sinatra-footnotes/notes/sinatra_routes_note.rb', line 6
def initialize(controller)
@controller = controller
@parsed_routes = parse_routes(controller)
end
|
Instance Method Details
#content ⇒ Object
19
20
21
22
|
# File 'lib/sinatra-footnotes/notes/sinatra_routes_note.rb', line 19
def content
mount_table(@parsed_routes.unshift([:method, :path]), :summary => "Debug information for #{title}")
end
|
#legend ⇒ Object
15
16
17
|
# File 'lib/sinatra-footnotes/notes/sinatra_routes_note.rb', line 15
def legend
'Routes'
end
|
#title ⇒ Object
11
12
13
|
# File 'lib/sinatra-footnotes/notes/sinatra_routes_note.rb', line 11
def title
"Routes (#{@parsed_routes.size})" end
|