Class: Cookie::Header::Attribute
- Inherits:
-
Object
- Object
- Cookie::Header::Attribute
show all
- Includes:
- Adamantium
- Defined in:
- lib/cookie/header/attribute.rb
Overview
Baseclass for cookie attributes
Defined Under Namespace
Classes: Binary, Domain, Expires, HttpOnly, MaxAge, Path, Secure, Set, Unary
Constant Summary
collapse
- REGISTRY =
{}
- Expired =
Already expired Expires attribute useful for cookie deletion
Expires.new(Time.at(0))
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.attribute_name ⇒ Object
22
23
24
|
# File 'lib/cookie/header/attribute.rb', line 22
def self.attribute_name
name.split(DOUBLE_COLON).last
end
|
.coerce(name, value) ⇒ Object
14
15
16
|
# File 'lib/cookie/header/attribute.rb', line 14
def self.coerce(name, value)
REGISTRY.fetch(name.to_sym).build(value)
end
|
.register_as(name) ⇒ Object
18
19
20
|
# File 'lib/cookie/header/attribute.rb', line 18
def self.register_as(name)
REGISTRY[name.to_sym] = self
end
|
Instance Method Details
#to_s ⇒ Object
26
27
28
|
# File 'lib/cookie/header/attribute.rb', line 26
def to_s
name
end
|