Class: Breed

Inherits:
Object
  • Object
show all
Defined in:
lib/pup_finder/breed.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(breed_name, breed_link, breed_size) ⇒ Breed

Returns a new instance of Breed.



7
8
9
10
11
12
13
14
15
16
# File 'lib/pup_finder/breed.rb', line 7

def initialize(breed_name, breed_link, breed_size)
    @breed_name = breed_name
    @breed_link = breed_link
    @breed_size = breed_size
    @temperament = nil
    @weight = nil
    @life_expectancy = nil
    @description = nil
    @@all << self
end

Instance Attribute Details

Returns the value of attribute breed_link.



3
4
5
# File 'lib/pup_finder/breed.rb', line 3

def breed_link
  @breed_link
end

#breed_nameObject (readonly)

Returns the value of attribute breed_name.



3
4
5
# File 'lib/pup_finder/breed.rb', line 3

def breed_name
  @breed_name
end

#breed_sizeObject (readonly)

Returns the value of attribute breed_size.



3
4
5
# File 'lib/pup_finder/breed.rb', line 3

def breed_size
  @breed_size
end

#descriptionObject

Returns the value of attribute description.



2
3
4
# File 'lib/pup_finder/breed.rb', line 2

def description
  @description
end

#life_expectancyObject

Returns the value of attribute life_expectancy.



2
3
4
# File 'lib/pup_finder/breed.rb', line 2

def life_expectancy
  @life_expectancy
end

#temperamentObject

Returns the value of attribute temperament.



2
3
4
# File 'lib/pup_finder/breed.rb', line 2

def temperament
  @temperament
end

#weightObject

Returns the value of attribute weight.



2
3
4
# File 'lib/pup_finder/breed.rb', line 2

def weight
  @weight
end

Class Method Details

.allObject



18
19
20
# File 'lib/pup_finder/breed.rb', line 18

def self.all
    @@all
end