Module: EveStatic::Coerce

Included in:
Database
Defined in:
lib/eve_static/coerce.rb

Instance Method Summary collapse

Instance Method Details

#coerce_industry_type(type) ⇒ Object



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

def coerce_industry_type(type)      
  hash = coerce_type(type)
  
  typeID = hash[:typeID]
  typeName = hash[:typeName]
  
  if !(typeName =~ /.+Blueprint/)
    typeID = blueprint(typeID)[:blueprintTypeID]
  end
  
  typeID
end

#coerce_type_id(type) ⇒ Object



3
4
5
# File 'lib/eve_static/coerce.rb', line 3

def coerce_type_id(type)
  coerce_type(type)[:typeID]
end

#coerce_type_name(type) ⇒ Object



7
8
9
# File 'lib/eve_static/coerce.rb', line 7

def coerce_type_name(type)
  coerce_type(type)[:typeName]
end