Class: Cookie::Header::Attribute::Binary Abstract

Inherits:
Cookie::Header::Attribute show all
Includes:
AbstractType
Defined in:
lib/cookie/header/attribute.rb

Overview

This class is abstract.

Abstract baseclass for attributes that consist of a name-value pair

Direct Known Subclasses

Domain, Expires, MaxAge, Path

Constant Summary

Constants inherited from Cookie::Header::Attribute

Expired, REGISTRY

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Cookie::Header::Attribute

attribute_name, coerce, register_as

Constructor Details

#initialize(value) ⇒ Binary

Returns a new instance of Binary.



113
114
115
116
# File 'lib/cookie/header/attribute.rb', line 113

def initialize(value)
  super(self.class.attribute_name)
  @value = value
end

Class Method Details

.build(value) ⇒ Object



109
110
111
# File 'lib/cookie/header/attribute.rb', line 109

def self.build(value)
  new(value)
end

Instance Method Details

#to_sObject



118
119
120
# File 'lib/cookie/header/attribute.rb', line 118

def to_s
  "#{name}=#{serialized_value}"
end