Class: Udb::ExceptionCode

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/udb/exception_code.rb

Overview

a synchroncous exception code

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, var, number, ext)

Parameters:

  • name (String)
  • var (String)
  • number (Integer)
  • ext (Extension)


35
36
37
38
39
40
41
# File 'lib/udb/exception_code.rb', line 35

def initialize(name, var, number, ext)
  @name = T.let(name, String)
  @name.freeze
  @var = T.let(var, String)
  @num = T.let(number, Integer)
  @ext = T.let(ext, Extension)
end

Instance Attribute Details

#extExtension (readonly)

Returns Extension that defines this code.

Returns:

  • (Extension)

    Extension that defines this code



32
33
34
# File 'lib/udb/exception_code.rb', line 32

def ext
  @ext
end

#nameString (readonly)

Returns Long-form display name (can include special characters).

Returns:

  • (String)

    Long-form display name (can include special characters)



20
21
22
# File 'lib/udb/exception_code.rb', line 20

def name
  @name
end

#numInteger (readonly)

Returns Code, written into *mcause.

Returns:

  • (Integer)

    Code, written into *mcause



28
29
30
# File 'lib/udb/exception_code.rb', line 28

def num
  @num
end

#varString (readonly)

Returns Field name for an IDL enum.

Returns:

  • (String)

    Field name for an IDL enum



24
25
26
# File 'lib/udb/exception_code.rb', line 24

def var
  @var
end