class RackConsole::CookieScriptStorage

Constants

WARNING_LIMIT_MSG

Attributes

script[RW]

Public Class Methods

new(env, cookie_key: '_rack-console-script', max_length: 4000) click to toggle source
# File lib/rack_console/cookie_script_storage.rb, line 8
def initialize(env, cookie_key: '_rack-console-script', max_length: 4000)
  @env, @cookie_key, @max_length = env, cookie_key, max_length
  @script = ::CGI::Cookie.parse(env['HTTP_COOKIE'].to_s)[cookie_key]&.first || ''
end

Public Instance Methods