Replace env.output interface with an IO like object

This commit is contained in:
Thibault Jouan
2013-12-23 00:50:25 +00:00
parent e8b0900721
commit d670d5dbdd
6 changed files with 23 additions and 21 deletions

View File

@@ -1,18 +1,13 @@
module Producer
module Core
class Env
attr_writer :output
attr_accessor :target
attr_accessor :output, :target
def initialize
@output = $stdout
def initialize(output: $stdout)
@output = output
@target = nil
end
def output(str)
@output.puts str
end
def remote
@remote ||= Remote.new(target)
end