class IndoorJungle::Plant
Attributes
modeling after the student creator, I will need a place to store all the plants and then each plant's attributes
modeling after the student creator, I will need a place to store all the plants and then each plant's attributes
modeling after the student creator, I will need a place to store all the plants and then each plant's attributes
modeling after the student creator, I will need a place to store all the plants and then each plant's attributes
modeling after the student creator, I will need a place to store all the plants and then each plant's attributes
modeling after the student creator, I will need a place to store all the plants and then each plant's attributes
modeling after the student creator, I will need a place to store all the plants and then each plant's attributes
Public Class Methods
# File lib/indoor_jungle/plant.rb, line 15 def self.all @@all end
# File lib/indoor_jungle/plant.rb, line 19 def self.create_from_collection(plants_array) plants_array.each do |plant| plant = self.new(plant) @@plants << plant end end
# File lib/indoor_jungle/plant.rb, line 10 def initialize(plant_hash) plant_hash.each {|key, value| self.send(("#{key}="), value)} @@all << self end
Public Instance Methods
# File lib/indoor_jungle/plant.rb, line 26 def add_plant_attributes(attributes_hash) attributes_hash.each {|key, value| self.send(("#{key}="), value)} end