Sha256: 7ac7a6c3c4574963351a532b194bf69aeb55c76cef89eb40c27ac22143e5e8c2
Contents?: true
Size: 306 Bytes
Versions: 1
Compression:
Stored size: 306 Bytes
Contents
class Game attr_accessor :name, :price @@all = [] def initialize(attributes) attributes.each { |key, value| self.send("#{key}=", value) } end def self.mass_create(games) games.each { |game| @@all << Game.new(game) unless game[:name].empty? } end def self.all @@all end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
game_gem-0.6.0 | lib/game_gem/game.rb |