Class: Evedb::Model
- Inherits:
-
Object
- Object
- Evedb::Model
- Defined in:
- lib/evedb/model.rb
Class Method Summary collapse
Class Method Details
.all ⇒ Object
15 16 17 18 19 |
# File 'lib/evedb/model.rb', line 15 def self.all list.map do |id| self::API.new.send self::GET_METHOD, id end end |
.find(id) ⇒ Object
5 6 7 8 9 |
# File 'lib/evedb/model.rb', line 5 def self.find(id) self::API.new.send(self::GET_METHOD, id) rescue ESI::ApiError => e return false if e. == 'Not Found' end |
.list ⇒ Object
11 12 13 |
# File 'lib/evedb/model.rb', line 11 def self.list self::API.new.send(self::LIST_METHOD) end |