Class: Cookie::Header::Attribute::Set
- Inherits:
-
Object
- Object
- Cookie::Header::Attribute::Set
- Includes:
- Adamantium, Enumerable
- Defined in:
- lib/cookie/header/attribute.rb
Overview
Models a set of attributes used within a Serializable cookie
Direct Known Subclasses
Defined Under Namespace
Classes: Empty
Constant Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#each(&block) ⇒ Object
44 45 46 47 48 |
# File 'lib/cookie/header/attribute.rb', line 44 def each(&block) return to_enum unless block attributes.each_value(&block) self end |
#merge(attribute) ⇒ Object
50 51 52 |
# File 'lib/cookie/header/attribute.rb', line 50 def merge(attribute) Set.new(attributes.merge(attribute.name => attribute)) end |
#to_s ⇒ Object
54 55 56 |
# File 'lib/cookie/header/attribute.rb', line 54 def to_s "#{COOKIE_SEPARATOR}#{map(&:to_s).join(COOKIE_SEPARATOR)}" end |