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

Methods included from Config

included

Instance Method Details

#fallback_resultObject



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

def fallback_result
  success
end

#resultObject



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

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

  out.puts

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

  success
end