Class: Nl::DataTypes::Flag

Inherits:
Base
  • Object
show all
Defined in:
nl/lib/nl/datatypes.rb

Instance Method Summary collapse

Methods inherited from Base

#coerce, #initialize, #nlattr_type_flags

Constructor Details

This class inherits a constructor from Nl::DataTypes::Base

Instance Method Details

#decode(decoder, context: nil, nlattr_type_flags: 0) ⇒ Object



204
205
206
# File 'nl/lib/nl/datatypes.rb', line 204

def decode(decoder, context: nil, nlattr_type_flags: 0)
  true
end

#encode(encoder, value, context: nil) ⇒ Object



200
201
202
# File 'nl/lib/nl/datatypes.rb', line 200

def encode(encoder, value, context: nil)
  # flag attribute has no payload; presence encodes true
end