Created
September 24, 2010 20:19
-
-
Save kblake/595961 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# post.rb ############ | |
module Commentable | |
attr_accessor :comments | |
def setup_comments | |
@comments ||= [] | |
end | |
def add_comment(comment) | |
@comments << comment | |
end | |
# remove comment | |
# sorted comments | |
# find comment | |
end | |
# create a Post class with a title and body attributes. make it commentable using the Commentable module | |
# test drive the code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment