Sha256: 62b8402143a71c4d1c5b1cd28920cd1d98c1373117abf47ae4a43a9365a34121
Contents?: true
Size: 1.04 KB
Versions: 62
Compression:
Stored size: 1.04 KB
Contents
module Pfm # Module of common functions that are used frequently in every namespace module Helpers module_function # Runs given commands using mixlib-shellout # # @param command_args [String] the system command to run def system_command(*command_args) cmd = Mixlib::ShellOut.new(*command_args) cmd.run_command err(cmd.stderr) msg(cmd.stdout) cmd end # Print the given string to stderr # # @param message [String] the string to print def err(message) stderr.print("#{message}\n") end # Print the given string to stdout # # @param message [String] the string to print def msg(message) stdout.print("#{message}\n") end # Only prints the given string to stdout when the environment variable # DEBUG = true # # @param message [String] the string to print def debug(message) stdout.print("#{message}\n") if ENV['DEBUG'] end private def stdout $stdout end def stderr $stderr end end end
Version data entries
62 entries across 62 versions & 2 rubygems