Class: Consently::Cookie

Inherits:
Struct
  • Object
show all
Defined in:
lib/consently/cookie.rb

Overview

One cookie a tag is known to set. A cookie policy has to name them and say how long they last, which is exactly the part everyone copies from a competitor's site and gets wrong.

days is nil for a session cookie.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#daysObject

Returns the value of attribute days

Returns:

  • (Object)

    the current value of days



7
8
9
# File 'lib/consently/cookie.rb', line 7

def days
  @days
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



7
8
9
# File 'lib/consently/cookie.rb', line 7

def name
  @name
end

#providerObject

Returns the value of attribute provider

Returns:

  • (Object)

    the current value of provider



7
8
9
# File 'lib/consently/cookie.rb', line 7

def provider
  @provider
end

Instance Method Details

#session?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/consently/cookie.rb', line 8

def session?
  days.nil?
end