Class: QuietQuality::Cli::Presenter

Inherits:
Object
  • Object
show all
Defined in:
lib/quiet_quality/cli/presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(stream:, options:, outcomes:, messages:) ⇒ Presenter

Returns a new instance of Presenter.



4
5
6
7
8
9
# File 'lib/quiet_quality/cli/presenter.rb', line 4

def initialize(stream:, options:, outcomes:, messages:)
  @stream = stream
  @options = options
  @outcomes = outcomes
  @messages = messages
end

Instance Method Details

#log_resultsObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/quiet_quality/cli/presenter.rb', line 11

def log_results
  return if options.quiet?

  if options.light?
    log_light_outcomes
  else
    log_outcomes
    log_messages
  end
end