Refactor CLI

This commit is contained in:
Thibault Jouan
2014-09-22 13:00:50 +00:00
parent ea6875e9ee
commit 52e183b277
3 changed files with 21 additions and 50 deletions

View File

@@ -25,7 +25,7 @@ module Producer
end
end
attr_reader :arguments, :stdin, :stdout, :stderr, :env
attr_reader :arguments, :env
def initialize(args, stdin: $stdin, stdout: $stdout, stderr: $stderr)
@arguments = args
@@ -49,7 +49,7 @@ module Producer
m
end
fail ArgumentError unless arguments.any?
fail ArgumentError unless @arguments.any?
end
def run(worker: Worker.new(@env))