Class: Breed
- Inherits:
-
Object
- Object
- Breed
- Defined in:
- lib/pup_finder/breed.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#breed_link ⇒ Object
readonly
Returns the value of attribute breed_link.
-
#breed_name ⇒ Object
readonly
Returns the value of attribute breed_name.
-
#breed_size ⇒ Object
readonly
Returns the value of attribute breed_size.
-
#description ⇒ Object
Returns the value of attribute description.
-
#life_expectancy ⇒ Object
Returns the value of attribute life_expectancy.
-
#temperament ⇒ Object
Returns the value of attribute temperament.
-
#weight ⇒ Object
Returns the value of attribute weight.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(breed_name, breed_link, breed_size) ⇒ Breed
constructor
A new instance of Breed.
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
#breed_link ⇒ Object (readonly)
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_name ⇒ Object (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_size ⇒ Object (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 |
#description ⇒ Object
Returns the value of attribute description.
2 3 4 |
# File 'lib/pup_finder/breed.rb', line 2 def description @description end |
#life_expectancy ⇒ Object
Returns the value of attribute life_expectancy.
2 3 4 |
# File 'lib/pup_finder/breed.rb', line 2 def life_expectancy @life_expectancy end |
#temperament ⇒ Object
Returns the value of attribute temperament.
2 3 4 |
# File 'lib/pup_finder/breed.rb', line 2 def temperament @temperament end |
#weight ⇒ Object
Returns the value of attribute weight.
2 3 4 |
# File 'lib/pup_finder/breed.rb', line 2 def weight @weight end |
Class Method Details
.all ⇒ Object
18 19 20 |
# File 'lib/pup_finder/breed.rb', line 18 def self.all @@all end |