Class: Cborb::Decoding::Types::SimpleValue

Inherits:
Type
  • Object
show all
Defined in:
lib/cborb/decoding/types/simple_value.rb

Overview

To represent part of major type: 7

Constant Summary collapse

VALUES =
[
  false,
  true,
  nil,
  nil, # doesn't exist "undefined" in ruby
].freeze

Class Method Summary collapse

Methods inherited from Type

accept, indefinite?

Class Method Details

.decode(state, additional_info) ⇒ Object



13
14
15
# File 'lib/cborb/decoding/types/simple_value.rb', line 13

def self.decode(state, additional_info) 
  state.accept_value(self, VALUES[additional_info - 20])
end