Class: CBOR::Tagged

Inherits:
Struct show all
Defined in:
lib/cbor-pure.rb,
lib/cbor-diagnostic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#tagObject

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



67
68
69
# File 'lib/cbor-pure.rb', line 67

def tag
  @tag
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



67
68
69
# File 'lib/cbor-pure.rb', line 67

def value
  @value
end

Instance Method Details

#cbor_diagnostic(options = {}) ⇒ Object



117
118
119
# File 'lib/cbor-diagnostic.rb', line 117

def cbor_diagnostic(options = {})
  "#{tag}(#{value.cbor_diagnostic(options)})"
end

#dataObject

backwards compat to pre-0.5.0



74
75
76
# File 'lib/cbor-pure.rb', line 74

def data                    # backwards compat to pre-0.5.0
  value
end

#inspectObject



71
72
73
# File 'lib/cbor-pure.rb', line 71

def inspect
  "#{tag}(#{value.inspect})"
end

#to_sObject



68
69
70
# File 'lib/cbor-pure.rb', line 68

def to_s
  "#{tag}(#{value})"
end