Introduce Env to manage CLI env and config

This commit is contained in:
Thibault Jouan
2015-04-07 23:13:28 +00:00
parent 12075323c5
commit 304db803f3
5 changed files with 81 additions and 19 deletions

22
lib/uh/wm/env.rb Normal file
View File

@@ -0,0 +1,22 @@
require 'logger'
module Uh
module WM
class Env
attr_reader :output, :logger
def initialize output, logger_: Logger.new(output)
@output = output
@logger = logger_
end
def log message
logger.info message
end
def print message
@output.print message
end
end
end
end