lib/easy_app_helper/core/base.rb
# Executes code (block given) unless :simulate is in the config.
# If :simulate specified then display message instead of executing the code (block).
Executes code (block given) unless :simulate is in the config.
If :simulate specified then display message instead of executing the code (block).
Executes code ( block given ) unless : simulate is in the config . If : simulate specified then display message instead of executing the code ( block ) .
def safely_exec(message, *args)
    raise "No block given" unless block_given?
    if self[:simulate]
      logger.puts_and_logs "SIMULATING: #{message}" unless message.nil?
    else
      logger.puts_and_logs message
      yield(*args)
    end
  end
def safely_exec ( message , * args ) raise "No block given" unless block_given? if self [ :simulate ] logger . puts_and_logs "SIMULATING: #{message}" unless message . nil? else logger . puts_and_logs message yield ( * args ) end end
Executes code (block given) unless :simulate is in the config.
Executes code ( block given ) unless : simulate is in the config .
message
<not_specific>
args
<not_specific>