Class: GitPrepareBranch::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/git-prepare-branch/logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(stream: $stdout) ⇒ Logger

Returns a new instance of Logger.



3
4
5
# File 'lib/git-prepare-branch/logger.rb', line 3

def initialize(stream: $stdout)
  @stream = stream
end

Instance Method Details

#log(message) ⇒ Object



7
8
9
10
# File 'lib/git-prepare-branch/logger.rb', line 7

def log message
  stream << format_message(message)
  stream.flush
end