Class: Reve::Classes::Sovereignty

Inherits:
Object
  • Object
show all
Defined in:
lib/reve/classes.rb

Overview

Used for the Reve::API#sovereignty call. Attributes

  • system_id ( Fixnum ) - ID of the System

  • alliance_id ( Fixnum ) - ID of the Alliance that controls the System

  • constellation_sovereignty ( Fixnum ) - ID of the Alliance that has Constellation Sovereignty for a given System’s Constellation

  • level ( Fixnum ) - Not sure? Level of Constellation Sovereignty

  • faction_id ( Fixnum ) - ID of the Faction that controls the System

  • system_name ( String ) - Name of the System

See Also: Alliance, Reve::API#alliances TODO: Find out what constellationSovereignty is

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ Sovereignty

:nodoc:



1245
1246
1247
1248
1249
1250
1251
1252
# File 'lib/reve/classes.rb', line 1245

def initialize(elem) #:nodoc:
  @system_id                 = elem['solarSystemID'].to_i
  @alliance_id               = elem['allianceID'] == '0' ? nil : elem['allianceID'].to_i
  @constellation_sovereignty = elem['constellationSovereignty'].to_i
  @level                     = elem['sovereigntyLevel'].to_i if elem['sovereigntyLevel']
  @faction_id                = elem['factionID'] == '0' ? nil : elem['factionID'].to_i
  @system_name               = elem['solarSystemName']
end

Instance Attribute Details

#alliance_idObject (readonly)

Returns the value of attribute alliance_id.



1244
1245
1246
# File 'lib/reve/classes.rb', line 1244

def alliance_id
  @alliance_id
end

#constellation_sovereigntyObject (readonly)

Returns the value of attribute constellation_sovereignty.



1244
1245
1246
# File 'lib/reve/classes.rb', line 1244

def constellation_sovereignty
  @constellation_sovereignty
end

#faction_idObject (readonly)

Returns the value of attribute faction_id.



1244
1245
1246
# File 'lib/reve/classes.rb', line 1244

def faction_id
  @faction_id
end

#levelObject (readonly)

Returns the value of attribute level.



1244
1245
1246
# File 'lib/reve/classes.rb', line 1244

def level
  @level
end

#system_idObject (readonly)

Returns the value of attribute system_id.



1244
1245
1246
# File 'lib/reve/classes.rb', line 1244

def system_id
  @system_id
end

#system_nameObject (readonly)

Returns the value of attribute system_name.



1244
1245
1246
# File 'lib/reve/classes.rb', line 1244

def system_name
  @system_name
end