Sha256: 80444f8c1882157426ec7f15811b697d1c46c9566ec5a0772c4dcb55bee6fc10
Contents?: true
Size: 454 Bytes
Versions: 7
Compression:
Stored size: 454 Bytes
Contents
module Pixelpress class Preview def self.all Dir[Rails.root.join('spec', 'printers', 'previews', '**', '*_preview.rb')].map do |file| require_dependency file file.split('printers/previews/').last.sub('.rb', '').classify.constantize.new end end def previews methods - Object.methods - [:previews, :printer_name] end def printer_name self.class.name.underscore.tr('/', '_') end end end
Version data entries
7 entries across 7 versions & 1 rubygems