Class: CatAdoption::Cat

Inherits:
Object
  • Object
show all
Defined in:
lib/cat_adoption/cat.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil, url = nil, number_label = nil, breed_label = nil, sex_label = nil, dob_label = nil, age_label = nil, weight_label = nil, color_label = nil, location_label = nil, fee_label = nil, number = nil, breed = nil, sex = nil, dob = nil, age = nil, weight = nil, color = nil, location = nil, fee = nil, description = nil) ⇒ Cat

Returns a new instance of Cat.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/cat_adoption/cat.rb', line 6

def initialize(name = nil, url = nil, number_label = nil, breed_label = nil, sex_label = nil, dob_label = nil, age_label = nil, weight_label = nil, color_label = nil, location_label = nil, fee_label = nil, number = nil, breed = nil, sex = nil, dob = nil, age = nil, weight = nil, color = nil, location = nil, fee = nil, description = nil)
  @number_label = number_label
  @breed_label = breed_label
  @sex_label = sex_label
  @dob_label = dob_label
  @age_label = age_label
  @weight_label = weight_label
  @color_label = color_label
  @location_label = location_label
  @fee_label = fee_label
  @name = name
  @url = url
  @number = number
  @breed = breed
  @sex = sex
  @dob = dob
  @age = age
  @weight = weight
  @color = color
  @location = location
  @fee = fee
  @description = description
  @@all << self
end

Instance Attribute Details

#ageObject

Returns the value of attribute age.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def age
  @age
end

#age_labelObject

Returns the value of attribute age_label.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def age_label
  @age_label
end

#breedObject

Returns the value of attribute breed.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def breed
  @breed
end

#breed_labelObject

Returns the value of attribute breed_label.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def breed_label
  @breed_label
end

#colorObject

Returns the value of attribute color.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def color
  @color
end

#color_labelObject

Returns the value of attribute color_label.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def color_label
  @color_label
end

#descriptionObject

Returns the value of attribute description.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def description
  @description
end

#dobObject

Returns the value of attribute dob.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def dob
  @dob
end

#dob_labelObject

Returns the value of attribute dob_label.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def dob_label
  @dob_label
end

#feeObject

Returns the value of attribute fee.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def fee
  @fee
end

#fee_labelObject

Returns the value of attribute fee_label.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def fee_label
  @fee_label
end

#locationObject

Returns the value of attribute location.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def location
  @location
end

#location_labelObject

Returns the value of attribute location_label.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def location_label
  @location_label
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def name
  @name
end

#numberObject

Returns the value of attribute number.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def number
  @number
end

#number_labelObject

Returns the value of attribute number_label.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def number_label
  @number_label
end

#sexObject

Returns the value of attribute sex.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def sex
  @sex
end

#sex_labelObject

Returns the value of attribute sex_label.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def sex_label
  @sex_label
end

#urlObject

Returns the value of attribute url.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def url
  @url
end

#weightObject

Returns the value of attribute weight.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def weight
  @weight
end

#weight_labelObject

Returns the value of attribute weight_label.



2
3
4
# File 'lib/cat_adoption/cat.rb', line 2

def weight_label
  @weight_label
end

Class Method Details

.allObject



31
32
33
# File 'lib/cat_adoption/cat.rb', line 31

def self.all
  @@all
end