Sha256: 88d383aeb469e1cad225eba0b5548b93517fa7218ffbdaebe911161c9364e3d0

Contents?: true

Size: 476 Bytes

Versions: 4

Compression:

Stored size: 476 Bytes

Contents

require "colorize"

module Putter
  module PrintStrategy
    Default = Proc.new do |data|
      prefix = "\tPutter Debugging: #{data.label} ".colorize(:cyan)
      if data.line.nil?
        line = " "
      elsif data.line[0] != "/"
        line = "./#{data.line} "
      else
        line = ".#{data.line} "
      end
      suffix = "-- Method: :#{data.method}, Args: #{data.args}, Result: #{data.result}".colorize(:green)
      puts prefix + line + suffix
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
putter-0.7.0 lib/putter/print_strategy.rb
putter-0.6.1 lib/putter/print_strategy.rb
putter-0.6.0 lib/putter/print_strategy.rb
putter-0.5.1 lib/putter/print_strategy.rb