Class: CBOR::Tag

Inherits:
Struct
  • Object
show all
Defined in:
lib/libcbor/tag.rb

Overview

Represents a tagged item – a pair of number and the item

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#itemObject

The tagged item

Returns:

  • (Object)

    the current value of item



6
7
8
# File 'lib/libcbor/tag.rb', line 6

def item
  @item
end

#valueFixnum

The tag value

Returns:

  • (Fixnum)

    the current value of value



6
7
8
# File 'lib/libcbor/tag.rb', line 6

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



7
8
9
10
11
# File 'lib/libcbor/tag.rb', line 7

def ==(other)
	if other.is_a? Tag
		value == other.value && item == other.item
	end
end