Class: QuoraNotify::Cookie

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Cookie

Returns a new instance of Cookie.



11
12
13
14
15
16
17
18
19
# File 'lib/quora_notify/cookie.rb', line 11

def initialize(opts = {})
  @name    = opts[:name]
  @value   = opts[:value]
  @domain  = opts[:domain]
  @path    = opts[:path]
  @flag    = opts[:flag]
  @expires = opts[:expires]
  @created = opts[:created]
end

Instance Attribute Details

#createdObject (readonly)

Returns the value of attribute created.



3
4
5
# File 'lib/quora_notify/cookie.rb', line 3

def created
  @created
end

#domainObject (readonly)

Returns the value of attribute domain.



3
4
5
# File 'lib/quora_notify/cookie.rb', line 3

def domain
  @domain
end

#expiresObject (readonly)

Returns the value of attribute expires.



3
4
5
# File 'lib/quora_notify/cookie.rb', line 3

def expires
  @expires
end

#flagObject (readonly)

Returns the value of attribute flag.



3
4
5
# File 'lib/quora_notify/cookie.rb', line 3

def flag
  @flag
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/quora_notify/cookie.rb', line 3

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/quora_notify/cookie.rb', line 3

def path
  @path
end

#valueObject (readonly)

Returns the value of attribute value.



3
4
5
# File 'lib/quora_notify/cookie.rb', line 3

def value
  @value
end

Class Method Details



6
7
8
# File 'lib/quora_notify/cookie.rb', line 6

def cookie_time(time)
  Time.at(time).strftime('%a, %d %b %Y')
end