Module: Kurchatov::Mixin::Command
- Included in:
- Plugins::Riemann
- Defined in:
- lib/kurchatov/mixin/command.rb
Instance Method Summary collapse
Instance Method Details
#shell(cmd) ⇒ Object
17 18 19 20 |
# File 'lib/kurchatov/mixin/command.rb', line 17 def shell(cmd) mix = shell_out!(cmd) mix.stdout end |
#shell_out(cmd) ⇒ Object
5 6 7 8 9 |
# File 'lib/kurchatov/mixin/command.rb', line 5 def shell_out(cmd) mix = ::Mixlib::ShellOut.new(cmd) mix.run_command mix end |
#shell_out!(cmd) ⇒ Object
11 12 13 14 15 |
# File 'lib/kurchatov/mixin/command.rb', line 11 def shell_out!(cmd) mix = shell_out(cmd) mix.error! mix end |