Class: TF2Engineer

Inherits:
Object
  • Object
show all
Includes:
TF2Class
Defined in:
lib/steam/community/tf2/tf2_engineer.rb

Overview

Represents the stats for the Team Fortress 2 engineer class for a specific user

Instance Attribute Summary collapse

Attributes included from TF2Class

#max_buildings_destroyed, #max_captures, #max_damage, #max_defenses, #max_dominations, #max_kill_assists, #max_kills, #max_revenges, #max_score, #max_time_alive

Attributes included from GameClass

#name, #play_time

Instance Method Summary collapse

Constructor Details

#initialize(class_data) ⇒ TF2Engineer

Creates a new instance of TF2Engineer based on the assigned XML data



17
18
19
20
21
22
23
# File 'lib/steam/community/tf2/tf2_engineer.rb', line 17

def initialize(class_data)
  super class_data

  @max_buildings_built = class_data.elements['ibuildingsbuilt'].text.to_i
  @max_teleports       = class_data.elements['inumteleports'].text.to_i
  @max_sentry_kills    = class_data.elements['isentrykills'].text.to_i
end

Instance Attribute Details

#max_buildings_builtObject (readonly)

Returns the value of attribute max_buildings_built.



14
15
16
# File 'lib/steam/community/tf2/tf2_engineer.rb', line 14

def max_buildings_built
  @max_buildings_built
end

#max_sentry_killsObject (readonly)

Returns the value of attribute max_sentry_kills.



14
15
16
# File 'lib/steam/community/tf2/tf2_engineer.rb', line 14

def max_sentry_kills
  @max_sentry_kills
end

#max_teleportsObject (readonly)

Returns the value of attribute max_teleports.



14
15
16
# File 'lib/steam/community/tf2/tf2_engineer.rb', line 14

def max_teleports
  @max_teleports
end