Class: TF2Engineer

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

Overview

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

Author:

  • Sebastian Staudt

Instance Attribute Summary collapse

Attributes inherited 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 the Engineer class based on the given XML data

Parameters:

  • class_data (Hash<String, Object>)

    The XML data for this Engineer



35
36
37
38
39
40
41
# File 'lib/steam/community/tf2/tf2_engineer.rb', line 35

def initialize(class_data)
  super class_data

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

Instance Attribute Details

#max_buildings_builtFixnum (readonly)

Returns the maximum number of buildings built by the player in a single life as an Engineer

Returns:

  • (Fixnum)

    Maximum number of buildings built



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

def max_buildings_built
  @max_buildings_built
end

#max_sentry_killsFixnum (readonly)

Returns the maximum number of enemies killed by sentry guns built by the player in a single life as an Engineer

Returns:

  • (Fixnum)

    Maximum number of sentry kills



24
25
26
# File 'lib/steam/community/tf2/tf2_engineer.rb', line 24

def max_sentry_kills
  @max_sentry_kills
end

#max_teleportsFixnum (readonly)

Returns the maximum number of teammates teleported by teleporters built by the player in a single life as an Engineer

Returns:

  • (Fixnum)

    Maximum number of teleports



30
31
32
# File 'lib/steam/community/tf2/tf2_engineer.rb', line 30

def max_teleports
  @max_teleports
end