Class: Melos::Struct::Credential

Inherits:
Base
  • Object
show all
Defined in:
lib/melos/struct/structs.rb

Constant Summary collapse

STRUCT =
[
  [:credential_type, :uint16],
  [:identity,     :select, ->(ctx){ctx[:credential_type] == Melos::Constants::CredentialType::BASIC}, :vec],
  [:certificates, :select, ->(ctx){ctx[:credential_type] == Melos::Constants::CredentialType::X509},  :classes, Melos::Struct::Certificate]
]

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#deserialize_select_elem_with_context, #initialize, #raw

Constructor Details

This class inherits a constructor from Melos::Struct::Base

Instance Attribute Details

#certificatesObject (readonly)

Returns the value of attribute certificates.



30
31
32
# File 'lib/melos/struct/structs.rb', line 30

def certificates
  @certificates
end

#credential_typeObject (readonly)

Returns the value of attribute credential_type.



30
31
32
# File 'lib/melos/struct/structs.rb', line 30

def credential_type
  @credential_type
end

#identityObject (readonly)

Returns the value of attribute identity.



30
31
32
# File 'lib/melos/struct/structs.rb', line 30

def identity
  @identity
end