Sha256: 2dcf8228a91b687e7cf7234efb376e82d0331e5bdca849d459427dbafc4ec112
Contents?: true
Size: 317 Bytes
Versions: 3
Compression:
Stored size: 317 Bytes
Contents
class Mongoid::Search::Log cattr_accessor :silent def self.log(message) print message unless silent end def self.red(text) log(colorize(text, 31)) end def self.green(text) log(colorize(text, 32)) end private def self.colorize(text, code) "\033[#{code}m#{text}\033[0m" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mongoid_search-0.4.0 | lib/mongoid_search/log.rb |
mongoid_search-0.3.6 | lib/mongoid_search/log.rb |
mongoid_search-0.3.5 | lib/mongoid_search/log.rb |