Skip to content

Instantly share code, notes, and snippets.

@codeschool-courses
Created August 22, 2012 20:52
Show Gist options
  • Save codeschool-courses/3429250 to your computer and use it in GitHub Desktop.
Save codeschool-courses/3429250 to your computer and use it in GitHub Desktop.
RubyBits
class Game
attr_accessor :name, :year, :system
attr_reader :created_at
def initialize(name, options={})
self.name = name
self.year = options[:year]
self.system = options[:system]
@created_at = Time.now
end
def ==(game)
name == game.name &&
system == game.system &&
year == game.year
end
end
@pedrofelipe
Copy link

a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment