Class: PuppetGenerator::Middleware::EnableDebuggingLibraries

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet_generator/middleware/enable_debugging_libraries.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ EnableDebuggingLibraries

Returns a new instance of EnableDebuggingLibraries.



4
5
6
# File 'lib/puppet_generator/middleware/enable_debugging_libraries.rb', line 4

def initialize(app)
  @app = app
end

Instance Method Details

#call(task) ⇒ Object



8
9
10
11
12
# File 'lib/puppet_generator/middleware/enable_debugging_libraries.rb', line 8

def call(task)
  PuppetGenerator.enable_debugging_libraries if task.meta[:debug] and not ENV['TRAVIS_CI'] == 'true'

  @app.call(task)
end