Class: DoDSClass
- Inherits:
-
Object
- Object
- DoDSClass
- Includes:
- GameClass
- Defined in:
- lib/steam/community/dods/dods_class.rb
Overview
Represents the stats for a DoD:S class for a specific user
Instance Attribute Summary collapse
-
#blocks ⇒ Object
readonly
Returns the value of attribute blocks.
-
#bombs_defused ⇒ Object
readonly
Returns the value of attribute bombs_defused.
-
#bombs_planted ⇒ Object
readonly
Returns the value of attribute bombs_planted.
-
#captures ⇒ Object
readonly
Returns the value of attribute captures.
-
#deaths ⇒ Object
readonly
Returns the value of attribute deaths.
-
#dominations ⇒ Object
readonly
Returns the value of attribute dominations.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#kills ⇒ Object
readonly
Returns the value of attribute kills.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#revenges ⇒ Object
readonly
Returns the value of attribute revenges.
-
#rounds_lost ⇒ Object
readonly
Returns the value of attribute rounds_lost.
-
#rounds_won ⇒ Object
readonly
Returns the value of attribute rounds_won.
Attributes included from GameClass
Instance Method Summary collapse
-
#initialize(class_data) ⇒ DoDSClass
constructor
Creates a new instance of DoDSClass based on the assigned XML data.
Constructor Details
#initialize(class_data) ⇒ DoDSClass
Creates a new instance of DoDSClass based on the assigned XML data
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/steam/community/dods/dods_class.rb', line 18 def initialize(class_data) @blocks = class_data.elements['blocks'].text.to_i @bombs_defused = class_data.elements['bombsdefused'].text.to_i @bombs_planted = class_data.elements['bombsplanted'].text.to_i @captures = class_data.elements['captures'].text.to_i @deaths = class_data.elements['deaths'].text.to_i @dominations = class_data.elements['dominations'].text.to_i @key = class_data.attributes['key'] @kills = class_data.elements['kills'].text.to_i @name = class_data.elements["name"].text @play_time = class_data.elements["playtime"].text.to_i @rounds_lost = class_data.elements['roundslost'].text.to_i @rounds_won = class_data.elements['roundswon'].text.to_i @revenges = class_data.elements['revenges'].text.to_i end |
Instance Attribute Details
#blocks ⇒ Object (readonly)
Returns the value of attribute blocks.
13 14 15 |
# File 'lib/steam/community/dods/dods_class.rb', line 13 def blocks @blocks end |
#bombs_defused ⇒ Object (readonly)
Returns the value of attribute bombs_defused.
13 14 15 |
# File 'lib/steam/community/dods/dods_class.rb', line 13 def bombs_defused @bombs_defused end |
#bombs_planted ⇒ Object (readonly)
Returns the value of attribute bombs_planted.
13 14 15 |
# File 'lib/steam/community/dods/dods_class.rb', line 13 def bombs_planted @bombs_planted end |
#captures ⇒ Object (readonly)
Returns the value of attribute captures.
13 14 15 |
# File 'lib/steam/community/dods/dods_class.rb', line 13 def captures @captures end |
#deaths ⇒ Object (readonly)
Returns the value of attribute deaths.
13 14 15 |
# File 'lib/steam/community/dods/dods_class.rb', line 13 def deaths @deaths end |
#dominations ⇒ Object (readonly)
Returns the value of attribute dominations.
13 14 15 |
# File 'lib/steam/community/dods/dods_class.rb', line 13 def dominations @dominations end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
13 14 15 |
# File 'lib/steam/community/dods/dods_class.rb', line 13 def key @key end |
#kills ⇒ Object (readonly)
Returns the value of attribute kills.
13 14 15 |
# File 'lib/steam/community/dods/dods_class.rb', line 13 def kills @kills end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
13 14 15 |
# File 'lib/steam/community/dods/dods_class.rb', line 13 def name @name end |
#revenges ⇒ Object (readonly)
Returns the value of attribute revenges.
13 14 15 |
# File 'lib/steam/community/dods/dods_class.rb', line 13 def revenges @revenges end |
#rounds_lost ⇒ Object (readonly)
Returns the value of attribute rounds_lost.
13 14 15 |
# File 'lib/steam/community/dods/dods_class.rb', line 13 def rounds_lost @rounds_lost end |
#rounds_won ⇒ Object (readonly)
Returns the value of attribute rounds_won.
13 14 15 |
# File 'lib/steam/community/dods/dods_class.rb', line 13 def rounds_won @rounds_won end |