Module: TeachingPrintables
- Extended by:
- TeachingPrintables
- Included in:
- TeachingPrintables
- Defined in:
- lib/teaching_printables.rb,
lib/teaching_printables/print_templates.rb,
lib/teaching_printables/grid_sheet/grid_sheet.rb
Defined Under Namespace
Modules: PrintTemplates Classes: GridSheet, PictureGridSheet
Constant Summary collapse
- BASEDIR =
The base source directory as installed on the system
File.(File.join(dir, '..'))
- GRAPHIC_EXTENSIONS =
[".jpg",".JPG",".png",".jpeg"]
Instance Method Summary collapse
Instance Method Details
#grid_sheet_with_content(content_array) ⇒ Object
34 35 36 37 38 39 |
# File 'lib/teaching_printables.rb', line 34 def grid_sheet_with_content(content_array) gs = GridSheet.new(TeachingPrintables::Printing::Templates::AVERY5371) gs.make_grid(content_array) gs.save_as("mygrid.pdf") puts "Sheet saved as mygrid.pdf" end |
#is_image_file?(filename) ⇒ Boolean
20 21 22 |
# File 'lib/teaching_printables.rb', line 20 def is_image_file?(filename) !filename.start_with?(".") && GRAPHIC_EXTENSIONS.include?(File.extname(filename)) end |