Class: Super
- Inherits:
-
Object
- Object
- Super
- Defined in:
- lib/super.rb
Constant Summary collapse
- @@all =
[]
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash) ⇒ Super
constructor
A new instance of Super.
Constructor Details
#initialize(hash) ⇒ Super
5 6 7 8 9 10 |
# File 'lib/super.rb', line 5 def initialize(hash) hash.each do |key, value| send("#{key}=", value) end @@all << self end |
Class Method Details
.all ⇒ Object
19 20 21 |
# File 'lib/super.rb', line 19 def self.all @@all end |
.create_from_collection(array_of_hash) ⇒ Object
12 13 14 15 16 |
# File 'lib/super.rb', line 12 def self.create_from_collection(array_of_hash) array_of_hash.each do |hash| self.new(hash) end end |