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:



1335
1336
1337
1338
1339
1340
1341
# File 'lib/reve/classes.rb', line 1335

def initialize(elem) #:nodoc:
  @system_id                 = elem['solarSystemID'].to_i
  @alliance_id               = elem['allianceID'] == '0' ? nil : elem['allianceID'].to_i
  @corporation_id             = elem['corporationID'] == '0' ? nil : elem['corporationID'].to_i
  @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.



1334
1335
1336
# File 'lib/reve/classes.rb', line 1334

def alliance_id
  @alliance_id
end

#corporation_idObject (readonly)

Returns the value of attribute corporation_id.



1334
1335
1336
# File 'lib/reve/classes.rb', line 1334

def corporation_id
  @corporation_id
end

#faction_idObject (readonly)

Returns the value of attribute faction_id.



1334
1335
1336
# File 'lib/reve/classes.rb', line 1334

def faction_id
  @faction_id
end

#factionIDObject (readonly)

Returns the value of attribute factionID.



1334
1335
1336
# File 'lib/reve/classes.rb', line 1334

def factionID
  @factionID
end

#system_idObject (readonly)

Returns the value of attribute system_id.



1334
1335
1336
# File 'lib/reve/classes.rb', line 1334

def system_id
  @system_id
end

#system_nameObject (readonly)

Returns the value of attribute system_name.



1334
1335
1336
# File 'lib/reve/classes.rb', line 1334

def system_name
  @system_name
end