Sha256: 92453a6f03938f059961cf400d59611ad4a86d825c6194ffde40375e1c25ce9a

Contents?: true

Size: 654 Bytes

Versions: 3

Compression:

Stored size: 654 Bytes

Contents

module ProMotion
  class Console
    NAME = "RubyMotion::Console: "
    DEFAULT_COLOR = [ '', '' ]
    RED_COLOR = [ "\e[0;31m", "\e[0m" ] # Must be in double quotes
    GREEN_COLOR = [ "\e[0;32m", "\e[0m" ] 
    PURPLE_COLOR = [ "\e[0;35m", "\e[0m" ] 

    class << self
      def log(log, with_color:color)
        puts color[0] + NAME + log + color[1]
      end
      
      def log(log, withColor:color)
        warn "[DEPRECATION] `log(log, withColor:color)` is deprecated. Use `log(log, with_color:color)`"
        self.log(log, with_color:color)
      end

      def log(log)
        log(log, with_color: DEFAULT_COLOR)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ProMotion-0.5.0 lib/ProMotion/helpers/console.rb
ProMotion-0.4.1 lib/ProMotion/_helpers/console.rb
ProMotion-0.4.0 lib/ProMotion/_helpers/console.rb