Class: Jordan_Edition
- Inherits:
-
Object
- Object
- Jordan_Edition
- Defined in:
- lib/Jordan_Edition.rb
Overview
Super
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#href ⇒ Object
Returns the value of attribute href.
-
#name ⇒ Object
Returns the value of attribute name.
-
#shoe_collection ⇒ Object
Returns the value of attribute shoe_collection.
Class Method Summary collapse
- .all ⇒ Object
-
.create_from_collection(array_of_hash) ⇒ Object
find or create would be better.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Jordan_Edition
constructor
A new instance of Jordan_Edition.
Constructor Details
#initialize(hash) ⇒ Jordan_Edition
7 8 9 10 11 12 |
# File 'lib/Jordan_Edition.rb', line 7 def initialize(hash) hash.each_pair do |key, value| send("#{key}=", value) end @@all << self end |
Instance Attribute Details
#href ⇒ Object
Returns the value of attribute href.
3 4 5 |
# File 'lib/Jordan_Edition.rb', line 3 def href @href end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/Jordan_Edition.rb', line 3 def name @name end |
#shoe_collection ⇒ Object
Returns the value of attribute shoe_collection.
3 4 5 |
# File 'lib/Jordan_Edition.rb', line 3 def shoe_collection @shoe_collection end |
Class Method Details
.all ⇒ Object
20 21 22 |
# File 'lib/Jordan_Edition.rb', line 20 def self.all @@all end |
.create_from_collection(array_of_hash) ⇒ Object
find or create would be better
14 15 16 17 18 |
# File 'lib/Jordan_Edition.rb', line 14 def self.create_from_collection(array_of_hash) #find or create would be better array_of_hash.each do |hash| self.new(hash) end end |