class CatBreeds::Cat

Attributes

blurb[RW]
characteristics[RW]
description[RW]
fun_fact[RW]
grooming[RW]
health[RW]
history[RW]
name[RW]
page_url[RW]
personality[RW]

Public Class Methods

all() click to toggle source
# File lib/cat_breeds/cats.rb, line 18
def self.all
        @@all
end
new(name, page_url) click to toggle source
# File lib/cat_breeds/cats.rb, line 6
def initialize(name, page_url)
        @name = name
        @page_url = page_url
        @@all << self
end

Public Instance Methods

add_details(details) click to toggle source
# File lib/cat_breeds/cats.rb, line 12
def add_details(details) #takes hash returned from CatBreeds::Scraper.scrape_profile(url) and adds breed data to the corresponding instance of cat breed
        details.each do |k,v|
                self.send("#{k}=", v)
        end
end