Class: NetObj::GameDataTeam

Inherits:
SnapItemBase show all
Defined in:
lib/snapshot/items/game_data_team.rb

Instance Attribute Summary collapse

Attributes inherited from SnapItemBase

#id, #name, #notes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SnapItemBase

#init_hash, #init_raw, #init_unpacker, #to_a, #to_h, #to_s, #validate

Constructor Details

#initialize(hash_or_raw) ⇒ GameDataTeam

Returns a new instance of GameDataTeam.



9
10
11
12
13
14
15
# File 'lib/snapshot/items/game_data_team.rb', line 9

def initialize(hash_or_raw)
  @field_names = %i[
    teamscore_red
    teamscore_blue
  ]
  super
end

Instance Attribute Details

#teamscore_blueObject

Returns the value of attribute teamscore_blue.



7
8
9
# File 'lib/snapshot/items/game_data_team.rb', line 7

def teamscore_blue
  @teamscore_blue
end

#teamscore_redObject

Returns the value of attribute teamscore_red.



7
8
9
# File 'lib/snapshot/items/game_data_team.rb', line 7

def teamscore_red
  @teamscore_red
end

Class Method Details

.match_type?(type) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/snapshot/items/game_data_team.rb', line 17

def self.match_type?(type)
  type == NETOBJTYPE_GAMEDATATEAM
end