Module: Containers::Commandable
- Extended by:
- ActiveSupport::Concern
- Included in:
- CLI, Generator::CLI
- Defined in:
- lib/containers/concerns/commandable.rb
Constant Summary collapse
- PREFIX =
"▶"
Instance Method Summary collapse
Instance Method Details
#execute_command(command, replace_current_process: true) ⇒ Object
14 15 16 17 18 |
# File 'lib/containers/concerns/commandable.rb', line 14 def execute_command(command, replace_current_process: true) command = command.squish puts_command command replace_current_process ? execute(command) : puts(`#{command}`) end |
#puts_command(command) ⇒ Object
10 11 12 |
# File 'lib/containers/concerns/commandable.rb', line 10 def puts_command(command) puts "#{Rainbow(PREFIX).green.faint} #{Rainbow(command).green.bright}" end |