Class: L4DWeapon
- Inherits:
-
Object
- Object
- L4DWeapon
- Includes:
- AbstractL4DWeapon
- Defined in:
- lib/steam/community/l4d/l4d_weapon.rb
Instance Attribute Summary collapse
-
#accuracy ⇒ Object
readonly
Returns the value of attribute accuracy.
-
#headshots_percentage ⇒ Object
readonly
Returns the value of attribute headshots_percentage.
-
#kill_percentage ⇒ Object
readonly
Returns the value of attribute kill_percentage.
Attributes included from GameWeapon
Instance Method Summary collapse
-
#initialize(weapon_data) ⇒ L4DWeapon
constructor
Creates a new instance of L4DWeapon based on the assigned XML data.
Methods included from GameWeapon
Constructor Details
#initialize(weapon_data) ⇒ L4DWeapon
Creates a new instance of L4DWeapon based on the assigned XML data
15 16 17 18 19 |
# File 'lib/steam/community/l4d/l4d_weapon.rb', line 15 def initialize(weapon_data) super weapon_data @kill_percentage = weapon_data.elements['killpct'].text end |
Instance Attribute Details
#accuracy ⇒ Object (readonly)
Returns the value of attribute accuracy.
12 13 14 |
# File 'lib/steam/community/l4d/l4d_weapon.rb', line 12 def accuracy @accuracy end |
#headshots_percentage ⇒ Object (readonly)
Returns the value of attribute headshots_percentage.
12 13 14 |
# File 'lib/steam/community/l4d/l4d_weapon.rb', line 12 def headshots_percentage @headshots_percentage end |
#kill_percentage ⇒ Object (readonly)
Returns the value of attribute kill_percentage.
12 13 14 |
# File 'lib/steam/community/l4d/l4d_weapon.rb', line 12 def kill_percentage @kill_percentage end |