Class: Reve::Classes::Kill
Overview
Simple class to contain the information relevant to a single Kill. Comprised of an array of KillLoss, an array of KillAttacker and one KillVictim Attributes
-
victim ( KillVictim ) - Instance of the KillVictim class to represent the victim of the Kill.
-
attackers ( [KillAttacker] ) - Array of KillAttacker objects that represent the people who killed the
victim
. -
losses ( [KillLoss] ) - Array of KillLoss objects that represents the
victim
‘s items destroyed in the Kill. -
system_id ( Fixnum ) - The ID of the System that the Kill took place in.
-
id ( Fixnum ) - The ID of this specific Kill
-
moon_id ( Fixnum | NilClass ) - The ID of the Moon that this kill happened at (due to a POS?), if any; nil otherwise.
See Also: KillAttacker, KillVictim, KillLoss, Reve::API#personal_kills, Reve::API#corporate_kills
Instance Attribute Summary collapse
-
#attackers ⇒ Object
readonly
Returns the value of attribute attackers.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#losses ⇒ Object
readonly
Returns the value of attribute losses.
-
#moon_id ⇒ Object
readonly
Returns the value of attribute moon_id.
-
#system_id ⇒ Object
readonly
Returns the value of attribute system_id.
-
#victim ⇒ Object
readonly
Returns the value of attribute victim.
Instance Method Summary collapse
-
#initialize(elem, victim, attackers, losses) ⇒ Kill
constructor
:nodoc:.
Constructor Details
#initialize(elem, victim, attackers, losses) ⇒ Kill
:nodoc:
388 389 390 391 392 393 394 |
# File 'lib/reve/classes.rb', line 388 def initialize(elem, victim, attackers, losses) #:nodoc: @victim, @attackers, @losses = victim, attackers, losses @system_id = elem['solarSystemID'].to_i @created_at = elem['killTime'].to_time @id = elem['killID'].to_i @moon_id = elem['moonID'] == "0" ? nil : elem['moonID'].to_i end |
Instance Attribute Details
#attackers ⇒ Object (readonly)
Returns the value of attribute attackers.
386 387 388 |
# File 'lib/reve/classes.rb', line 386 def attackers @attackers end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
387 388 389 |
# File 'lib/reve/classes.rb', line 387 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
387 388 389 |
# File 'lib/reve/classes.rb', line 387 def id @id end |
#losses ⇒ Object (readonly)
Returns the value of attribute losses.
386 387 388 |
# File 'lib/reve/classes.rb', line 386 def losses @losses end |
#moon_id ⇒ Object (readonly)
Returns the value of attribute moon_id.
387 388 389 |
# File 'lib/reve/classes.rb', line 387 def moon_id @moon_id end |
#system_id ⇒ Object (readonly)
Returns the value of attribute system_id.
387 388 389 |
# File 'lib/reve/classes.rb', line 387 def system_id @system_id end |
#victim ⇒ Object (readonly)
Returns the value of attribute victim.
386 387 388 |
# File 'lib/reve/classes.rb', line 386 def victim @victim end |