Module: Log

Included in:
Global, Image
Defined in:
lib/fantasy/includes/log.rb

Instance Method Summary collapse

Instance Method Details

#log(message) ⇒ Object



2
3
4
5
6
7
8
9
10
11
# File 'lib/fantasy/includes/log.rb', line 2

def log(message)
  if ENV["debug"] == "active"
    full_message = "[#{Time.now.strftime("%T")}]"
    full_message += " [#{object_id}]"
    full_message += " [#{@name}]" if defined?(@name)
    full_message += " : #{message}"

    puts full_message
  end
end