Class: EveOnline::Api::SolarSystem
- Inherits:
-
Object
- Object
- EveOnline::Api::SolarSystem
- Includes:
- Comparable
- Defined in:
- lib/eve_online/api/solar_system.rb
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #alliance_id ⇒ Object
- #corporation_id ⇒ Object
- #faction_id ⇒ Object
- #id ⇒ Object
-
#initialize(fragment) ⇒ SolarSystem
constructor
A new instance of SolarSystem.
- #name ⇒ Object
- #to_s(indent = 0) ⇒ Object
Constructor Details
#initialize(fragment) ⇒ SolarSystem
Returns a new instance of SolarSystem.
7 8 9 |
# File 'lib/eve_online/api/solar_system.rb', line 7 def initialize fragment self.fragment = fragment end |
Instance Method Details
#<=>(other) ⇒ Object
31 32 33 |
# File 'lib/eve_online/api/solar_system.rb', line 31 def <=> other name <=> other.name end |
#alliance_id ⇒ Object
19 20 21 |
# File 'lib/eve_online/api/solar_system.rb', line 19 def alliance_id fragment['allianceID'] end |
#corporation_id ⇒ Object
23 24 25 |
# File 'lib/eve_online/api/solar_system.rb', line 23 def corporation_id fragment['corporationID'] end |
#faction_id ⇒ Object
27 28 29 |
# File 'lib/eve_online/api/solar_system.rb', line 27 def faction_id fragment['factionID'] end |
#id ⇒ Object
11 12 13 |
# File 'lib/eve_online/api/solar_system.rb', line 11 def id fragment['solarSystemID'] end |
#name ⇒ Object
15 16 17 |
# File 'lib/eve_online/api/solar_system.rb', line 15 def name fragment['solarSystemName'] end |
#to_s(indent = 0) ⇒ Object
36 37 38 39 |
# File 'lib/eve_online/api/solar_system.rb', line 36 def to_s indent = 0 margin = " " * indent "#{margin}#{name} Solar System (id:#{id}, alliance:#{alliance_id}, corporation:#{corporation_id}, faction:#{faction_id})" end |