Class: ExceptionCode

Inherits:
Object
  • Object
show all
Defined in:
lib/arch_def.rb

Overview

a synchroncous exception code

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, var, number, ext) ⇒ ExceptionCode

Returns a new instance of ExceptionCode.



1145
1146
1147
1148
1149
1150
1151
# File 'lib/arch_def.rb', line 1145

def initialize(name, var, number, ext)
  @name = name
  @name.freeze
  @var = var
  @num = number
  @ext = ext
end

Instance Attribute Details

#extExtension (readonly)

Returns Extension that defines this code.

Returns:

  • (Extension)

    Extension that defines this code



1143
1144
1145
# File 'lib/arch_def.rb', line 1143

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)



1134
1135
1136
# File 'lib/arch_def.rb', line 1134

def name
  @name
end

#numInteger (readonly)

Returns Code, written into *mcause.

Returns:

  • (Integer)

    Code, written into *mcause



1140
1141
1142
# File 'lib/arch_def.rb', line 1140

def num
  @num
end

#varString (readonly)

Returns Field name for an IDL enum.

Returns:

  • (String)

    Field name for an IDL enum



1137
1138
1139
# File 'lib/arch_def.rb', line 1137

def var
  @var
end