Class: CBOR::Simple

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



56
57
58
# File 'lib/cbor-pure.rb', line 56

def value
  @value
end

Instance Method Details

#to_sObject Also known as: inspect



57
58
59
60
61
62
63
# File 'lib/cbor-pure.rb', line 57

def to_s
  if value == 23
    "undefined"
  else
    "simple(#{value})"
  end
end