Class: RubySMB::Field::NtStatus
- Inherits:
-
BinData::Primitive
- Object
- BinData::Primitive
- RubySMB::Field::NtStatus
- Defined in:
- lib/ruby_smb/field/nt_status.rb
Overview
Represents an NTStatus code as defined in 2.3.1 NTSTATUS values
Instance Method Summary collapse
- #get ⇒ Object
- #set(value) ⇒ Object
-
#to_nt_status ⇒ WindowsError::ErrorCode
Returns a meaningful error code parsed from the numeric value.
Instance Method Details
#get ⇒ Object
11 12 13 |
# File 'lib/ruby_smb/field/nt_status.rb', line 11 def get val.to_i end |
#set(value) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ruby_smb/field/nt_status.rb', line 15 def set(value) case value when WindowsError::ErrorCode set(value.value) when Integer self.val = value else self.val = value.to_i end val end |
#to_nt_status ⇒ WindowsError::ErrorCode
Returns a meaningful error code parsed from the numeric value
30 31 32 |
# File 'lib/ruby_smb/field/nt_status.rb', line 30 def to_nt_status WindowsError::NTStatus.find_by_retval(value).first end |