Module: EacRubyUtils::Envs::BaseCommand::Debugging

Defined in:
lib/eac_ruby_utils/envs/base_command/debugging.rb

Instance Method Summary collapse

Instance Method Details

#debug?Boolean

Returns:



7
8
9
# File 'lib/eac_ruby_utils/envs/base_command/debugging.rb', line 7

def debug?
  ENV['DEBUG'].to_s.strip != ''
end

#debug_print(message) ⇒ Object

Print a message if debugging is enabled.



12
13
14
15
# File 'lib/eac_ruby_utils/envs/base_command/debugging.rb', line 12

def debug_print(message)
  message = message.to_s
  puts message.if_respond(:light_red, message) if debug?
end