Class: Esi::GetSystemInfo

Inherits:
Download
  • Object
show all
Defined in:
lib/gets/get_system_info.rb

Instance Method Summary collapse

Constructor Details

#initializeGetSystemInfo



7
8
9
10
# File 'lib/gets/get_system_info.rb', line 7

def initialize
  super
  @system_infos = {}
end

Instance Method Details

#get(system_id) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/gets/get_system_info.rb', line 12

def get( system_id )
  unless @system_infos[ system_id ]
    @rest_url = "universe/systems/#{system_id}/"

    # p @rest_url
    system_data = get_page_retry_on_error

    # p system_data
    @system_infos[system_id] = OpenStruct.new( system_data )
  end

  @system_infos[system_id]
end