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

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



24
25
26
# File 'lib/cbor-pure.rb', line 24

def data
  @data
end

#tagObject

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



24
25
26
# File 'lib/cbor-pure.rb', line 24

def tag
  @tag
end

Instance Method Details

#cbor_diagnosticObject



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

def cbor_diagnostic
  "#{tag}(#{data.cbor_diagnostic})"
end

#inspectObject



28
29
30
# File 'lib/cbor-pure.rb', line 28

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

#to_sObject



25
26
27
# File 'lib/cbor-pure.rb', line 25

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