Skip to content

Instantly share code, notes, and snippets.

@codeschool-courses
Created October 13, 2012 20:36
Show Gist options
  • Save codeschool-courses/3886066 to your computer and use it in GitHub Desktop.
Save codeschool-courses/3886066 to your computer and use it in GitHub Desktop.
RubyBits II 6-4 - game.rb
class Game
attr_reader :name, :tags
def initialize(name)
@name = name
@year = nil
@system = nil
@tags = []
end
def year(value)
@year = value
end
def system(value)
@system = value
end
def print_details
puts "#{@name} - #{@year} (#{@system})"
end
def play
end
def capture_screenshot
end
def method_missing(method_name, *args)
@tags << method_name.to_s
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment