Created
September 28, 2011 10:36
-
-
Save kiote/1247612 to your computer and use it in GitHub Desktop.
abstract_report
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
class Report | |
def make_report(data) | |
make_header | |
make_body | |
make_footer | |
end | |
protected | |
# методы ничего не реализуют | |
def make_header | |
end | |
def make_body | |
end | |
def make_footer | |
end | |
end | |
class PdfReport < Report | |
protected | |
# реализация методов для pdf-версии | |
def make_header | |
end | |
def make_body | |
end | |
def make_footer | |
end | |
end | |
class HtmlReport < Report | |
protected | |
# реализация методов для html-версии | |
def make_header | |
end | |
def make_body | |
end | |
def make_footer | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment