Module: Api::Attribute
- Defined in:
- lib/sc2ai/protocol/data_pb.rb
Constant Summary collapse
- ENUM_ATTRIBUTE_UNSET =
0
- LIGHT =
1
- ARMORED =
2
- BIOLOGICAL =
3
- MECHANICAL =
4
- ROBOTIC =
5
- PSIONIC =
6
- MASSIVE =
7
- STRUCTURE =
8
- HOVER =
9
- HEROIC =
10
- SUMMONED =
11
Class Method Summary collapse
Class Method Details
.lookup(val) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/sc2ai/protocol/data_pb.rb', line 20 def self.lookup(val) if val == 0 :ENUM_ATTRIBUTE_UNSET elsif val == 1 :LIGHT elsif val == 2 :ARMORED elsif val == 3 :BIOLOGICAL elsif val == 4 :MECHANICAL elsif val == 5 :ROBOTIC elsif val == 6 :PSIONIC elsif val == 7 :MASSIVE elsif val == 8 :STRUCTURE elsif val == 9 :HOVER elsif val == 10 :HEROIC elsif val == 11 :SUMMONED end end |
.resolve(val) ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/sc2ai/protocol/data_pb.rb', line 48 def self.resolve(val) if val == :ENUM_ATTRIBUTE_UNSET 0 elsif val == :LIGHT 1 elsif val == :ARMORED 2 elsif val == :BIOLOGICAL 3 elsif val == :MECHANICAL 4 elsif val == :ROBOTIC 5 elsif val == :PSIONIC 6 elsif val == :MASSIVE 7 elsif val == :STRUCTURE 8 elsif val == :HOVER 9 elsif val == :HEROIC 10 elsif val == :SUMMONED 11 end end |