Class: Reve::Classes::KillVictim
Overview
Represents the victim of a Kill. Attributes:
-
id ( Fixnum ) - ID of the Character that was killed.
-
name ( String ) - The name of the Character that was killed.
-
corporation_id ( Fixnum ) - The ID of the Corporation that the victim belongs to.
-
corporation_name ( String ) - Name of the Corporation that the victim belongs to.
-
alliance_id ( Fixnum | NilClass ) - The ID of the Alliance that the victim belongs to, if applicable. Will be nil unless the victim was in an Alliance
-
alliance_name ( String | NilClass ) - Name of the Alliance the Character is in, if any.
-
damage_taken ( Fixnum ) - The amount of damage the victim took before being killed.
-
ship_type_id ( Fixnum ) - ID of the ship type (references CCP data dump) that the victim was flying.
See Also: KillAttacker, Kill, KillLoss, Reve::API#personal_kills, Reve::API#corporate_kills
Instance Attribute Summary collapse
-
#alliance_id ⇒ Object
readonly
Returns the value of attribute alliance_id.
-
#corporation_id ⇒ Object
readonly
Returns the value of attribute corporation_id.
-
#corporation_name ⇒ Object
readonly
Returns the value of attribute corporation_name.
-
#damage_taken ⇒ Object
readonly
Returns the value of attribute damage_taken.
-
#faction_id ⇒ Object
readonly
Returns the value of attribute faction_id.
-
#faction_name ⇒ Object
readonly
Returns the value of attribute faction_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#ship_type_id ⇒ Object
readonly
Returns the value of attribute ship_type_id.
Instance Method Summary collapse
-
#initialize(elem) ⇒ KillVictim
constructor
:nodoc:.
Constructor Details
#initialize(elem) ⇒ KillVictim
:nodoc:
304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/reve/classes.rb', line 304 def initialize(elem) #:nodoc: @id = elem['characterID'].to_i @name = elem['characterName'] @corporation_id = elem['corporationID'] @corporation_name = elem['corporationName'] @alliance_id = elem['allianceID'] == "0" ? nil : elem['allianceID'].to_i @faction_id = elem['factionID'] == "0" ? nil : elem['factionID'].to_i @faction_id = elem['factionID'] == "0" ? nil : elem['factionID'].to_i @faction_name = elem['factionName'].empty? ? nil : elem['factionName'] @alliance_name = elem['allianceName'].empty? ? nil : elem['allianceName'] @damage_taken = elem['damageTaken'].to_i @ship_type_id = elem['shipTypeID'].to_i end |
Instance Attribute Details
#alliance_id ⇒ Object (readonly)
Returns the value of attribute alliance_id.
303 304 305 |
# File 'lib/reve/classes.rb', line 303 def alliance_id @alliance_id end |
#corporation_id ⇒ Object (readonly)
Returns the value of attribute corporation_id.
303 304 305 |
# File 'lib/reve/classes.rb', line 303 def corporation_id @corporation_id end |
#corporation_name ⇒ Object (readonly)
Returns the value of attribute corporation_name.
303 304 305 |
# File 'lib/reve/classes.rb', line 303 def corporation_name @corporation_name end |
#damage_taken ⇒ Object (readonly)
Returns the value of attribute damage_taken.
303 304 305 |
# File 'lib/reve/classes.rb', line 303 def damage_taken @damage_taken end |
#faction_id ⇒ Object (readonly)
Returns the value of attribute faction_id.
303 304 305 |
# File 'lib/reve/classes.rb', line 303 def faction_id @faction_id end |
#faction_name ⇒ Object (readonly)
Returns the value of attribute faction_name.
303 304 305 |
# File 'lib/reve/classes.rb', line 303 def faction_name @faction_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
303 304 305 |
# File 'lib/reve/classes.rb', line 303 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
303 304 305 |
# File 'lib/reve/classes.rb', line 303 def name @name end |
#ship_type_id ⇒ Object (readonly)
Returns the value of attribute ship_type_id.
303 304 305 |
# File 'lib/reve/classes.rb', line 303 def ship_type_id @ship_type_id end |