Class: DragonflyPuppeteer::Plugin

Inherits:
Object
  • Object
show all
Defined in:
lib/dragonfly_puppeteer/plugin.rb

Instance Method Summary collapse

Instance Method Details

#call(app, options = {}) ⇒ Object



3
4
5
6
7
8
# File 'lib/dragonfly_puppeteer/plugin.rb', line 3

def call(app, options={})
  app.env[:node_command] = options[:node_command] || 'node'

  app.add_generator :pdf, DragonflyPuppeteer::Generators::Pdf.new
  app.add_generator :screenshot, DragonflyPuppeteer::Generators::Screenshot.new
end