Class: Reve::Classes::FactionWarSystemStatus
- Defined in:
- lib/reve/classes.rb
Overview
The status of a System with regards to a FactionWar. Who controls what and what System is contested Attributes:
-
system_id ( Fixnum ) - ID of the System
-
system_name ( String ) - Name of the System
-
faction_id ( Fixnum | NilClass ) - ID of the Faction that is occupying this System. If no Faction controls this System this will be nil.
-
faction_name ( String | NilClass ) - Name of the Faction that is occupying this System. If no Faction controls this System this will be nil.
-
contested ( Boolean ) - Is this System contested?
Instance Attribute Summary collapse
-
#contested ⇒ Object
readonly
Returns the value of attribute contested.
-
#faction_id ⇒ Object
readonly
Returns the value of attribute faction_id.
-
#faction_name ⇒ Object
readonly
Returns the value of attribute faction_name.
-
#system_id ⇒ Object
readonly
Returns the value of attribute system_id.
-
#system_name ⇒ Object
readonly
Returns the value of attribute system_name.
Instance Method Summary collapse
-
#initialize(elem) ⇒ FactionWarSystemStatus
constructor
:nodoc:.
Constructor Details
#initialize(elem) ⇒ FactionWarSystemStatus
:nodoc:
191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/reve/classes.rb', line 191 def initialize(elem) #:nodoc: @system_id = elem['solarSystemID'].to_i @system_name = elem['solarSystemName'] @faction_id = elem['occupyingFactionID'].to_i @faction_name = elem['occupyingFactionName'] @contested = elem['contested'] == 'True' if @faction_id == 0 @faction_id = nil @faction_name = nil end end |
Instance Attribute Details
#contested ⇒ Object (readonly)
Returns the value of attribute contested.
190 191 192 |
# File 'lib/reve/classes.rb', line 190 def contested @contested end |
#faction_id ⇒ Object (readonly)
Returns the value of attribute faction_id.
190 191 192 |
# File 'lib/reve/classes.rb', line 190 def faction_id @faction_id end |
#faction_name ⇒ Object (readonly)
Returns the value of attribute faction_name.
190 191 192 |
# File 'lib/reve/classes.rb', line 190 def faction_name @faction_name end |
#system_id ⇒ Object (readonly)
Returns the value of attribute system_id.
190 191 192 |
# File 'lib/reve/classes.rb', line 190 def system_id @system_id end |
#system_name ⇒ Object (readonly)
Returns the value of attribute system_name.
190 191 192 |
# File 'lib/reve/classes.rb', line 190 def system_name @system_name end |