Exception: CBOR::OutOfBytesError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/cbor-pure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bytes) ⇒ OutOfBytesError

Returns a new instance of OutOfBytesError.



8
9
10
# File 'lib/cbor-pure.rb', line 8

def initialize(bytes)
  @bytes = bytes
end

Instance Attribute Details

#bytesObject (readonly)

Returns the value of attribute bytes.



15
16
17
# File 'lib/cbor-pure.rb', line 15

def bytes
  @bytes
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/cbor-pure.rb', line 12

def to_s
  "Out of bytes to decode (need at least #{@bytes} byte#{bytes == 1 ? "" : "s"} more)"
end