class PetfinderV2::Serializers::AnimalType
Attributes
breeds_link[R]
colors[R]
genders[R]
link[R]
name[R]
Public Class Methods
new(data)
click to toggle source
# File lib/petfinder_V2/serializers/animal_type.rb, line 10 def initialize(data) @name = data['name'] @colors = data['colors'] @genders = data['genders'] @link = data['_links']['self']['href'] @breeds_link = data['_links']['breeds']['href'] end
process_collection(data)
click to toggle source
# File lib/petfinder_V2/serializers/animal_type.rb, line 6 def self.process_collection(data) data['types'].map { |d| new(d) } end