Created
January 23, 2014 21:24
-
-
Save theotherzach/8587120 to your computer and use it in GitHub Desktop.
Context Arguments in Ruby
This file contains 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 ArticleTemplate | |
#TODO: Extract title and author into header method | |
#TODO: Extract body into its own method | |
#TODO: Don't hard-code text | |
def initialize | |
Prawn::Document.generate("tmp/production.pdf") do | |
text "The Prince", :align => :center, :size => 18 | |
text "Niccolò Machiavelli", :align => :center, :size => 14 | |
move_down 12 | |
text "All the States and Governments ..." | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment