Class: InternetMessage::Token
- Inherits:
-
Object
- Object
- InternetMessage::Token
- Defined in:
- lib/internet_message/tokenizer.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(type, value) ⇒ Token
constructor
A new instance of Token.
Constructor Details
#initialize(type, value) ⇒ Token
Returns a new instance of Token.
50 51 52 |
# File 'lib/internet_message/tokenizer.rb', line 50 def initialize(type, value) @type, @value = type, value end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
48 49 50 |
# File 'lib/internet_message/tokenizer.rb', line 48 def type @type end |
#value ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute value.
48 49 50 |
# File 'lib/internet_message/tokenizer.rb', line 48 def value @value end |
Instance Method Details
#==(other) ⇒ Object
56 57 58 |
# File 'lib/internet_message/tokenizer.rb', line 56 def ==(other) other.is_a?(self.class) && other.type == self.type && other.value == self.value end |