Class: Reve::Classes::Sovereignty
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
-
#alliance_id ⇒ Object
readonly
Returns the value of attribute alliance_id.
-
#constellation_sovereignty ⇒ Object
readonly
Returns the value of attribute constellation_sovereignty.
-
#faction_id ⇒ Object
readonly
Returns the value of attribute faction_id.
-
#level ⇒ Object
readonly
Returns the value of attribute level.
-
#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) ⇒ Sovereignty
constructor
:nodoc:.
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_id ⇒ Object (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_sovereignty ⇒ Object (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_id ⇒ Object (readonly)
Returns the value of attribute faction_id.
1244 1245 1246 |
# File 'lib/reve/classes.rb', line 1244 def faction_id @faction_id end |
#level ⇒ Object (readonly)
Returns the value of attribute level.
1244 1245 1246 |
# File 'lib/reve/classes.rb', line 1244 def level @level end |
#system_id ⇒ Object (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_name ⇒ Object (readonly)
Returns the value of attribute system_name.
1244 1245 1246 |
# File 'lib/reve/classes.rb', line 1244 def system_name @system_name end |