Class: ConvenientService::Examples::Dry::Gemfile::Services::PrintShellCommand

Inherits:
Object
  • Object
show all
Includes:
DryService::Config
Defined in:
lib/convenient_service/examples/dry/gemfile/services/print_shell_command.rb

Instance Method Summary collapse

Instance Method Details

#fallback_resultObject



36
37
38
# File 'lib/convenient_service/examples/dry/gemfile/services/print_shell_command.rb', line 36

def fallback_result
  success
end

#resultObject



26
27
28
29
30
31
32
33
34
# File 'lib/convenient_service/examples/dry/gemfile/services/print_shell_command.rb', line 26

def result
  return failure("Printing of shell command `#{command}` is skipped") if skip

  out.puts

  out.puts ::Paint["$ #{command}", :blue, :bold]

  success
end