class Cookie::Header::Attribute::Set
Models a set of attributes used within a {Serializable} cookie
Constants
- EMPTY
Public Class Methods
coerce(attributes)
click to toggle source
# File lib/cookie/header/attribute.rb, line 37 def self.coerce(attributes) new(attributes.each_with_object({}) { |(name, value), hash| attribute = Attribute.coerce(name, value) hash[attribute.name] = attribute if attribute }) end
Public Instance Methods
each(&block)
click to toggle source
# File lib/cookie/header/attribute.rb, line 44 def each(&block) return to_enum unless block attributes.each_value(&block) self end
merge(attribute)
click to toggle source
# File lib/cookie/header/attribute.rb, line 50 def merge(attribute) Set.new(attributes.merge(attribute.name => attribute)) end
to_s()
click to toggle source
# File lib/cookie/header/attribute.rb, line 54 def to_s "#{COOKIE_SEPARATOR}#{map(&:to_s).join(COOKIE_SEPARATOR)}" end