Module: LPImgApp::Views
- Defined in:
- lib/easylittleprinter.rb
Instance Method Summary collapse
-
#currentEdition ⇒ Object
View the edition for the user’s date.
-
#icon ⇒ Object
View for the icon.
-
#layout ⇒ Object
wraps all code in the same format, with the title being the name specified at the top.
-
#sample ⇒ Object
View for the sample.
Instance Method Details
#currentEdition ⇒ Object
View the edition for the user’s date.
140 141 142 143 |
# File 'lib/easylittleprinter.rb', line 140 def currentEdition @parsedLDT = Date.parse(@passedLDT) img :src => $imgHostURL + "/" + @parsedLDT.to_s + $imgFileExtension end |
#icon ⇒ Object
View for the icon
153 154 155 |
# File 'lib/easylittleprinter.rb', line 153 def icon img :src => $imgHostURL + "/" + $iconImg + ".png" end |
#layout ⇒ Object
wraps all code in the same format, with the title being the name specified at the top
124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/easylittleprinter.rb', line 124 def layout html do head do title { $title } style :type => "text/css" do %[ body { margin: 0 } #makes sure webkit doesn't add any margins ] end end body { self << yield } end end |
#sample ⇒ Object
View for the sample
147 148 149 |
# File 'lib/easylittleprinter.rb', line 147 def sample img :src => $imgHostURL + "/" + $sampleImg + $imgFileExtension end |