Module: Ewigkeks

Defined in:
lib/ewigkeks.rb,
lib/ewigkeks/engine.rb,
lib/ewigkeks/version.rb,
app/helpers/ewigkeks/application_helper.rb,
app/controllers/ewigkeks/cookies_controller.rb,
app/controllers/ewigkeks/application_controller.rb,
lib/generators/ewigkeks/install/install_generator.rb

Defined Under Namespace

Modules: ApplicationHelper Classes: ApplicationController, CookiesController, Engine, InstallGenerator

Constant Summary collapse

VERSION =
Gem::Version.new('1.0.0')

Class Method Summary collapse

Class Method Details



40
41
42
# File 'lib/ewigkeks.rb', line 40

def cache_cookie_name
  @@cache_cookie_name ||= '%s_cache' % js_class
end

.cache_pathObject



36
37
38
# File 'lib/ewigkeks.rb', line 36

def cache_path
  '/%s/%s' % [scope, 'cache']
end

.configure(options = {}) {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Ewigkeks)

    the object that the method was called on



8
9
10
11
12
13
14
# File 'lib/ewigkeks.rb', line 8

def configure(options = {}, &block)
  options.each do |key, value|
    public_send("#{key}=", value)
  end

  yield(self) if block_given?
end


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

def etag_cookie_name
  @@etag_cookie_name ||= '%s_etag' % js_class
end

.etag_pathObject



44
45
46
# File 'lib/ewigkeks.rb', line 44

def etag_path
  '/%s/%s' % [scope, 'etag']
end

.js_classObject



16
17
18
# File 'lib/ewigkeks.rb', line 16

def js_class
  @@js_class ||= 'evercookie'
end


32
33
34
# File 'lib/ewigkeks.rb', line 32

def png_cookie_name
  @@png_cookie_name ||= '%s_png' % js_class
end

.png_pathObject



28
29
30
# File 'lib/ewigkeks.rb', line 28

def png_path
  '/%s/%s' % [scope, 'png']
end

.scopeObject



20
21
22
# File 'lib/ewigkeks.rb', line 20

def scope
  @@scope ||= 'ewigkeks'
end

.scope=(scope) ⇒ Object



24
25
26
# File 'lib/ewigkeks.rb', line 24

def scope=(scope)
  @@scope = scope.sub(/\A\/*/, '')
end