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

Methods included from Config

included

Instance Method Details

#fallback_resultObject



41
42
43
# File 'lib/convenient_service/examples/dry/gemfile/services/print_shell_command.rb', line 41

def fallback_result
  success
end

#resultObject



31
32
33
34
35
36
37
38
39
# File 'lib/convenient_service/examples/dry/gemfile/services/print_shell_command.rb', line 31

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

  out.puts

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

  success
end