Class: NetObj::PlayerInfo
- Inherits:
-
SnapItemBase
- Object
- SnapItemBase
- NetObj::PlayerInfo
- Defined in:
- lib/snapshot/items/player_info.rb
Instance Attribute Summary collapse
-
#latency ⇒ Object
Returns the value of attribute latency.
-
#player_flags ⇒ Object
Returns the value of attribute player_flags.
-
#score ⇒ Object
Returns the value of attribute score.
Attributes inherited from SnapItemBase
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash_or_raw) ⇒ PlayerInfo
constructor
A new instance of PlayerInfo.
Methods inherited from SnapItemBase
#init_hash, #init_raw, #init_unpacker, #to_a, #to_h, #to_s, #validate
Constructor Details
#initialize(hash_or_raw) ⇒ PlayerInfo
Returns a new instance of PlayerInfo.
9 10 11 12 13 14 15 16 |
# File 'lib/snapshot/items/player_info.rb', line 9 def initialize(hash_or_raw) @field_names = i[ player_flags score latency ] super end |
Instance Attribute Details
#latency ⇒ Object
Returns the value of attribute latency.
7 8 9 |
# File 'lib/snapshot/items/player_info.rb', line 7 def latency @latency end |
#player_flags ⇒ Object
Returns the value of attribute player_flags.
7 8 9 |
# File 'lib/snapshot/items/player_info.rb', line 7 def player_flags @player_flags end |
#score ⇒ Object
Returns the value of attribute score.
7 8 9 |
# File 'lib/snapshot/items/player_info.rb', line 7 def score @score end |
Class Method Details
.match_type?(type) ⇒ Boolean
18 19 20 |
# File 'lib/snapshot/items/player_info.rb', line 18 def self.match_type?(type) type == NETOBJTYPE_PLAYERINFO end |