class CatsToAdopt::Cat

Attributes

age[RW]
color[RW]
gender[RW]
id[RW]
location[RW]
name[RW]
profile_url[RW]
size[RW]
weight[RW]

Public Class Methods

all() click to toggle source

CLASS METHODS

# File lib/cats_to_adopt/cat.rb, line 34
def self.all
  @@all
end
new() click to toggle source

INSTANCE METHODS save a cat when it's created

# File lib/cats_to_adopt/cat.rb, line 8
def initialize
  @@all << self
end
print_cats() click to toggle source

Public Instance Methods

add_cat_attributes(attributes) click to toggle source

set additional attributes on a cat

# File lib/cats_to_adopt/cat.rb, line 13
def add_cat_attributes(attributes)
  self.color = attributes[:color]
  self.weight = attributes[:weight]
  self.age = attributes[:age]
  self.profile_url = 'https://la.bestfriends.org/get-involved/adopt/pet/' + self.id
end
print_cat_info() click to toggle source

prints detailed information for a cat