Sha256: 924fc132897eaad5041558362827bf15e1bdb64e41024e35db05a245ba40d572

Contents?: true

Size: 433 Bytes

Versions: 23

Compression:

Stored size: 433 Bytes

Contents

require "#{File.dirname(__FILE__)}/abstract_note"

module Footnotes
  module Notes
    class CookiesNote < AbstractNote
      def initialize(controller)
        @cookies = (controller.__send__(:cookies) || {}).symbolize_keys
      end

      def title
        "Cookies (#{@cookies.length})"
      end

      def content
        mount_table_for_hash(@cookies, :summary => "Debug information for #{title}")
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 3 rubygems

Version Path
sinatra-footnotes-0.1.5 lib/sinatra-footnotes/notes/cookies_note.rb
sinatra-footnotes-0.1.4 lib/sinatra-footnotes/notes/cookies_note.rb
sinatra-footnotes-0.1.3 lib/sinatra-footnotes/notes/cookies_note.rb
sinatra-footnotes-0.1.2 lib/sinatra-footnotes/notes/cookies_note.rb
sinatra-footnotes-0.1.1 lib/sinatra-footnotes/notes/cookies_note.rb
sinatra-footnotes-0.1 lib/sinatra-footnotes/notes/cookies_note.rb
rails-footnotes-3.7.2 lib/rails-footnotes/notes/cookies_note.rb
rails-footnotes-3.7.1 lib/rails-footnotes/notes/cookies_note.rb
rails-footnotes-3.7.1.pre lib/rails-footnotes/notes/cookies_note.rb
rails3-footnotes-4.0.0.pre.10 lib/rails-footnotes/notes/cookies_note.rb
rails3-footnotes-4.0.0.pre.9 lib/rails-footnotes/notes/cookies_note.rb
rails3-footnotes-4.0.0.pre.8 lib/rails-footnotes/notes/cookies_note.rb
rails3-footnotes-4.0.0.pre.7 lib/rails-footnotes/notes/cookies_note.rb
rails3-footnotes-4.0.0.pre.6 lib/rails-footnotes/notes/cookies_note.rb
rails3-footnotes-4.0.0.pre.5 lib/rails-footnotes/notes/cookies_note.rb
rails3-footnotes-4.0.0.pre.4 lib/rails-footnotes/notes/cookies_note.rb
rails3-footnotes-4.0.0.pre.3 lib/rails-footnotes/notes/cookies_note.rb
rails-footnotes-3.7.0 lib/rails-footnotes/notes/cookies_note.rb
rails3-footnotes-4.0.0.pre.2 lib/rails-footnotes/notes/cookies_note.rb
rails3-footnotes-4.0.0.pre.1 lib/rails-footnotes/notes/cookies_note.rb