class Transit::TaggedValue

Represents a transit tag and value. Returned by default when a reader encounters a tag for which there is no registered handler. Can also be used in a custom write handler to force representation to use a transit ground type using a rep for which there is no registered handler (e.g., an iterable for the representation of an array). @see github.com/cognitect/transit-format

Attributes

rep[R]
tag[R]

Public Class Methods

new(tag, rep) click to toggle source
# File lib/transit/transit_types.rb, line 244
def initialize(tag, rep)
  @tag = tag
  @rep = rep
end

Public Instance Methods

==(other) click to toggle source
# File lib/transit/transit_types.rb, line 249
def ==(other)
  other.is_a?(self.class) && other.tag == @tag && other.rep == @rep
end
Also aliased as: eql?
eql?(other)
Alias for: ==
hash() click to toggle source
# File lib/transit/transit_types.rb, line 254
def hash
  @tag.hash + @rep.hash
end