Class: Reve::Classes::FactionWarSystemStatus

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#contestedObject (readonly)

Returns the value of attribute contested.



190
191
192
# File 'lib/reve/classes.rb', line 190

def contested
  @contested
end

#faction_idObject (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_nameObject (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_idObject (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_nameObject (readonly)

Returns the value of attribute system_name.



190
191
192
# File 'lib/reve/classes.rb', line 190

def system_name
  @system_name
end