Class: ConvenientService::Examples::Rails::Gemfile::Services::PrintShellCommand

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

Instance Method Summary collapse

Instance Method Details

#fallback_resultObject



32
33
34
# File 'lib/convenient_service/examples/rails/gemfile/services/print_shell_command.rb', line 32

def fallback_result
  success
end

#resultObject



22
23
24
25
26
27
28
29
30
# File 'lib/convenient_service/examples/rails/gemfile/services/print_shell_command.rb', line 22

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

  out.puts

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

  success
end