Class: Greeve::Eve::TypeName

Inherits:
BaseItem show all
Defined in:
lib/greeve/eve/type_name.rb

Overview

Returns the names associated with a sequence of typeIDs.

Instance Method Summary collapse

Methods inherited from BaseItem

attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s

Methods included from Helpers::AttributeToHash

#to_h

Constructor Details

#initialize(*ids, opts = {}) ⇒ TypeName

Returns a new instance of TypeName.

Parameters:

  • ids (Array<Integer>, Integer)

    EVE type IDs



19
20
21
22
23
24
25
# File 'lib/greeve/eve/type_name.rb', line 19

def initialize(*ids)
  opts = ids.last.is_a?(Hash) ? ids.pop : {}

  opts[:query_params] = { "IDs" => ids.join(",") }

  super(opts)
end