class Footnotes::Notes::SessionNote

Public Class Methods

new(controller) click to toggle source
# File lib/sinatra-footnotes/notes/session_note.rb, line 6
def initialize(controller)
  session = controller.session
  if session
    if session.respond_to? :to_hash
      # rails >= 2.3
      session = session.to_hash
    else
      #rails < 2.3
      session = session.data
    end
  end
  @session = (session || {}).symbolize_keys
end

Public Instance Methods

content() click to toggle source
# File lib/sinatra-footnotes/notes/session_note.rb, line 24
def content
  mount_table_for_hash(@session, :summary => "Debug information for #{title}")
end
title() click to toggle source
# File lib/sinatra-footnotes/notes/session_note.rb, line 20
def title
  "Session (#{@session.length})"
end