module Procodile

Constants

VERSION

Public Class Methods

bin_path() click to toggle source
# File lib/procodile.rb, line 7
def self.bin_path
  File.join(root, 'bin', 'procodile')
end
log(color, name, text) click to toggle source
# File lib/procodile/logger.rb, line 8
def self.log(color, name, text)
  mutex.synchronize do
    text.to_s.lines.map(&:chomp).each do |message|
      output  = ""
      output += "#{Time.now.strftime("%H:%M:%S")} #{name.ljust(18, ' ')} | ".color(color)
      output += message
      $stdout.puts output
      $stdout.flush
    end
  end
end
mutex() click to toggle source
# File lib/procodile/logger.rb, line 4
def self.mutex
  @mutex ||= Mutex.new
end
root() click to toggle source
# File lib/procodile.rb, line 3
def self.root
  File.expand_path('../../', __FILE__)
end