Sha256: 5fe69886dbaca89ea46635587d604dec1e6bc0bd750bcd4a9c095b9459fc0249

Contents?: true

Size: 579 Bytes

Versions: 11

Compression:

Stored size: 579 Bytes

Contents

require 'lucid/formatter/progress'
require 'lucid/step_definition_light'

module Lucid
  module Formatter
    class Debug
      def initialize(runtime, io, options)
        @io = io
        @indent = 0
      end

      def respond_to?(*args)
        true
      end

      def method_missing(name, *args)
        @indent -= 2 if name.to_s =~ /^after/
        print(name)
        @indent += 2 if name.to_s =~ /^before/
      end

    private

      def print(text)
        @io.puts "#{indent}#{text}"
      end

      def indent
        (' ' * @indent)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
lucid-0.3.3 lib/lucid/formatter/debug.rb
lucid-0.3.0 lib/lucid/formatter/debug.rb
lucid-0.2.1 lib/lucid/formatter/debug.rb
lucid-0.2.0 lib/lucid/formatter/debug.rb
lucid-0.1.1 lib/lucid/formatter/debug.rb
lucid-0.1.0 lib/lucid/formatter/debug.rb
lucid-0.0.9 lib/lucid/formatter/debug.rb
lucid-0.0.8 lib/lucid/formatter/debug.rb
lucid-0.0.7 lib/lucid/formatter/debug.rb
lucid-0.0.6 lib/lucid/formatter/debug.rb
lucid-0.0.5 lib/lucid/formatter/debug.rb