Class: Dockerspec::Builder::Logger::Info
- Inherits:
-
Object
- Object
- Dockerspec::Builder::Logger::Info
- Defined in:
- lib/dockerspec/builder/logger/info.rb
Overview
A Dockerspec::Builder logger that gives information about main build steps.
Instance Method Summary collapse
-
#initialize(output = STDOUT) ⇒ Info
constructor
Creates a Info logger instance.
-
#print_chunk(chunk) ⇒ Object
Prints the Docker build chunk.
Constructor Details
#initialize(output = STDOUT) ⇒ Info
Creates a Info logger instance.
35 36 37 38 |
# File 'lib/dockerspec/builder/logger/info.rb', line 35 def initialize(output = STDOUT) @output = output @status = nil end |
Instance Method Details
#print_chunk(chunk) ⇒ Object
Prints the Docker build chunk.
49 50 51 52 53 54 |
# File 'lib/dockerspec/builder/logger/info.rb', line 49 def print_chunk(chunk) chunk_json = parse_chunk(chunk) print_status(chunk_json['status']) return unless chunk_json.key?('stream') print_stream(chunk_json['stream']) end |