class Footnotes::Notes::FlashNote

Public Class Methods

new(controller) click to toggle source
# 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

Public Instance Methods

content() click to toggle source
# File lib/sinatra-footnotes/notes/flash_note.rb, line 19
def content
  mount_table_for_hash(@flash, :summary => "Debug information for #{title}")
end
title() click to toggle source
# File lib/sinatra-footnotes/notes/flash_note.rb, line 15
def title
  "Flash (#{@flash.length})"
end