Implement CLI debug option

This commit is contained in:
Thibault Jouan
2014-10-12 18:26:48 +00:00
parent 25d03d4322
commit e22d0039e1
8 changed files with 64 additions and 8 deletions

View File

@@ -2,10 +2,10 @@ module Producer
module Core
class Env
attr_reader :input, :output, :error_output, :registry, :logger
attr_accessor :target, :verbose, :dry_run
attr_accessor :target, :verbose, :debug, :dry_run
def initialize(input: $stdin, output: $stdout, error_output: $stderr, remote: nil, registry: {})
@verbose = @dry_run = false
@verbose = @debug = @dry_run = false
@input = input
@output = output
@error_output = error_output
@@ -45,6 +45,10 @@ module Producer
@verbose
end
def debug?
@debug
end
def dry_run?
@dry_run
end