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:
172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/reve/classes.rb', line 172 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.
171 172 173 |
# File 'lib/reve/classes.rb', line 171 def contested @contested end |
#faction_id ⇒ Object (readonly)
Returns the value of attribute faction_id.
171 172 173 |
# File 'lib/reve/classes.rb', line 171 def faction_id @faction_id end |
#faction_name ⇒ Object (readonly)
Returns the value of attribute faction_name.
171 172 173 |
# File 'lib/reve/classes.rb', line 171 def faction_name @faction_name end |
#system_id ⇒ Object (readonly)
Returns the value of attribute system_id.
171 172 173 |
# File 'lib/reve/classes.rb', line 171 def system_id @system_id end |
#system_name ⇒ Object (readonly)
Returns the value of attribute system_name.
171 172 173 |
# File 'lib/reve/classes.rb', line 171 def system_name @system_name end |