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



42
43
44
# File 'lib/cbor-pure.rb', line 42

def tag
  @tag
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



42
43
44
# File 'lib/cbor-pure.rb', line 42

def value
  @value
end

Instance Method Details

#cbor_diagnostic(options = {}) ⇒ Object



94
95
96
# File 'lib/cbor-diagnostic.rb', line 94

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

#dataObject

backwards compat to pre-0.5.0



49
50
51
# File 'lib/cbor-pure.rb', line 49

def data                    # backwards compat to pre-0.5.0
  value
end

#inspectObject



46
47
48
# File 'lib/cbor-pure.rb', line 46

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

#to_sObject



43
44
45
# File 'lib/cbor-pure.rb', line 43

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