Module: Evercookie

Defined in:
lib/evercookie.rb,
lib/evercookie/view.rb,
lib/evercookie/engine.rb,
lib/evercookie/version.rb,
lib/evercookie/controller.rb

Overview

main module for evercookie gem

Defined Under Namespace

Modules: ControllerHelpers, Rails, ViewHelper Classes: EvercookieController

Constant Summary collapse

VERSION =

Current gem version

"0.1.0"
@@namespace =
:evercookie
@@js_class =
:evercookie
:evercookie_cache
:evercookie_etag
:evercookie_png
@@hash_name =
:evercookie

Class Method Summary collapse

Class Method Details

.get_auth_pathObject

getter for path of etag action


84
85
86
# File 'lib/evercookie.rb', line 84

def self.get_auth_path
  "/#{get_namespace}/ec_auth"
end

.get_cache_pathObject

getter for path of cache action


69
70
71
# File 'lib/evercookie.rb', line 69

def self.get_cache_path
  "/#{get_namespace}/ec_cache"
end

getter for cookie path in javascript because rails controller actions get cookies only from it's controller path


59
60
61
# File 'lib/evercookie.rb', line 59

def self.get_cookie_path
  "/#{get_namespace}/"
end

.get_etag_pathObject

getter for path of etag action


74
75
76
# File 'lib/evercookie.rb', line 74

def self.get_etag_path
  "/#{get_namespace}/ec_etag"
end

.get_namespaceObject

getter for namespace


38
39
40
# File 'lib/evercookie.rb', line 38

def self.get_namespace
  @@namespace.to_sym
end

.get_png_pathObject

getter for path of png action


79
80
81
# File 'lib/evercookie.rb', line 79

def self.get_png_path
  "/#{get_namespace}/ec_png"
end

.get_save_pathObject

getter for path of save action


64
65
66
# File 'lib/evercookie.rb', line 64

def self.get_save_path
  "/#{get_namespace}/save"
end

.hash_name_for_getObject

getter for session key variable for get action


48
49
50
# File 'lib/evercookie.rb', line 48

def self.hash_name_for_get
  "#{@@hash_name}_get".to_sym
end

.hash_name_for_savedObject

getter for session key variable all stored evercookies


53
54
55
# File 'lib/evercookie.rb', line 53

def self.hash_name_for_saved
  "#{@@hash_name}_saved".to_sym
end

.hash_name_for_setObject

getter for session key variable for set action


43
44
45
# File 'lib/evercookie.rb', line 43

def self.hash_name_for_set
  "#{@@hash_name}_set".to_sym
end

.setup {|_self| ... } ⇒ Object

default method for setup evercookie

Yields:

  • (_self)

Yield Parameters:

  • _self (Evercookie)

    the object that the method was called on


33
34
35
# File 'lib/evercookie.rb', line 33

def self.setup
  yield self
end