module Terraform::Binary::Helpers

Generic helper methods

Public Instance Methods

debug(message) click to toggle source

prints to `stfout` if `ENV` is set

# File lib/terraform/binary/helpers.rb, line 25
def debug(message)
  stdout.print("#{message}\n") if ENV['DEBUG']
end
err(message) click to toggle source

prints to `stderr`

# File lib/terraform/binary/helpers.rb, line 15
def err(message)
  stderr.print("#{message}\n")
end
msg(message) click to toggle source

prints to `stdout`

# File lib/terraform/binary/helpers.rb, line 20
def msg(message)
  stdout.print("#{message}\n")
end
stderr() click to toggle source
# File lib/terraform/binary/helpers.rb, line 33
def stderr
  $stderr
end
stdout() click to toggle source
# File lib/terraform/binary/helpers.rb, line 29
def stdout
  $stdout
end
system_command(*command_args) click to toggle source

Runs given commands using mixlib-shellout

# File lib/terraform/binary/helpers.rb, line 8
def system_command(*command_args)
  cmd = Mixlib::ShellOut.new(*command_args)
  cmd.run_command
  cmd
end