Skip to content

Instantly share code, notes, and snippets.

@takaheraw
Created January 31, 2012 06:38
Show Gist options
  • Save takaheraw/1709256 to your computer and use it in GitHub Desktop.
Save takaheraw/1709256 to your computer and use it in GitHub Desktop.
module Printable
def print
end
def prepare_cover
end
end
module Document
def print_to_screen
prepare_cover
format_for_screen
print
end
def format_for_screen
end
def print
end
end
class Book
include Document
include Printable
end
p Book.ancestors # => [Book, Printable, Document, Object, Kernel, BasicObject]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment