Class: Footnotes::Notes::FlashNote
- Inherits:
-
AbstractNote
- Object
- AbstractNote
- Footnotes::Notes::FlashNote
- Defined in:
- lib/sinatra-footnotes/notes/flash_note.rb
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(controller) ⇒ FlashNote
constructor
A new instance of FlashNote.
- #title ⇒ Object
Methods inherited from AbstractNote
close!, #has_fieldset?, included?, #javascript, #legend, #link, #onclick, #row, start!, #stylesheet, title, #to_sym, to_sym, #valid?
Constructor Details
#initialize(controller) ⇒ FlashNote
Returns a new instance of FlashNote.
6 7 8 9 10 11 12 13 |
# File 'lib/sinatra-footnotes/notes/flash_note.rb', line 6 def initialize(controller) @flash = {} if controller.respond_to? :flash controller.flash.keys.each do |key| @flash[key] = controller.flash[key] end end end |
Instance Method Details
#content ⇒ Object
19 20 21 |
# File 'lib/sinatra-footnotes/notes/flash_note.rb', line 19 def content mount_table_for_hash(@flash, :summary => "Debug information for #{title}") end |
#title ⇒ Object
15 16 17 |
# File 'lib/sinatra-footnotes/notes/flash_note.rb', line 15 def title "Flash (#{@flash.length})" end |