Class: NOMS::Command::Window::Console

Inherits:
Base
  • Object
show all
Defined in:
lib/noms/command/window.rb

Instance Method Summary collapse

Methods inherited from Base

#default_logger

Constructor Details

#initialize(logger = nil) ⇒ Console

Returns a new instance of Console.



51
52
53
# File 'lib/noms/command/window.rb', line 51

def initialize(logger=nil)
    @log = logger || default_logger
end

Instance Method Details

#_sanitize(s) ⇒ Object



60
61
62
# File 'lib/noms/command/window.rb', line 60

def _sanitize(s)
    s.respond_to?(:to_str) ? s : s.to_json
end

#log(*items) ⇒ Object

Some implementations have a kind of format string. I don’t



56
57
58
# File 'lib/noms/command/window.rb', line 56

def log(*items)
    @log.debug(items.map { |s| _sanitize(s) }.join(', '))
end