Class: Rex::Proto::Thrift::ThriftDataType

Inherits:
BinData::Uint8
  • Object
show all
Defined in:
lib/rex/proto/thrift.rb

Constant Summary collapse

T_STOP =
0
T_BOOLEAN =
2
T_I16 =
6
T_I32 =
8
T_I64 =
10
T_UTF7 =
11
T_STRUCT =
12
T_SET =
14
T_LIST =
15

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.name(value) ⇒ Object



24
25
26
# File 'lib/rex/proto/thrift.rb', line 24

def self.name(value)
  constants.select { |c| c.upcase == c }.find { |c| const_get(c) == value }
end

Instance Method Details

#to_symObject



28
29
30
# File 'lib/rex/proto/thrift.rb', line 28

def to_sym
  self.class.name(value)
end