Class: EveCrest::Response::Constellation

Inherits:
BaseResponse show all
Defined in:
lib/responses/constellation.rb

Instance Attribute Summary

Attributes inherited from BaseResponse

#data

Instance Method Summary collapse

Methods inherited from BaseResponse

#cached_until, #error_message, #initialize, #raw, #success?

Constructor Details

This class inherits a constructor from EveCrest::BaseResponse

Instance Method Details

#nameObject



18
19
20
# File 'lib/responses/constellation.rb', line 18

def name
  data['name']
end

#positionObject



7
8
9
# File 'lib/responses/constellation.rb', line 7

def position
  data['position']
end

#regionObject



4
5
6
# File 'lib/responses/constellation.rb', line 4

def region
  data['region'].to_s.split('/')[4].to_i
end

#systemsObject



10
11
12
13
14
15
16
17
# File 'lib/responses/constellation.rb', line 10

def systems
  #only returns an array constellation ids
  _systems = Array.new
  data['systems'].each do |s|
    _systems.push(s['id'])
  end
  _systems
end