class PokeAPI::Type
Constants
- TYPES
Public Class Methods
find(id)
click to toggle source
# File lib/pokeapi/type.rb, line 15 def find(id) response = Requester.type(id) new response end
valid?(type)
click to toggle source
# File lib/pokeapi/type.rb, line 11 def valid?(type) TYPES.include?(type.to_s.downcase) end
Public Instance Methods
reload()
click to toggle source
# File lib/pokeapi/type.rb, line 21 def reload response = Requester.type(id) update_attributes!(response) self end