Class: Cucumber::Formatter::Debug

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/formatter/debug.rb

Instance Method Summary collapse

Constructor Details

#initialize(runtime, io, options) ⇒ Debug

Returns a new instance of Debug.



7
8
9
# File 'lib/cucumber/formatter/debug.rb', line 7

def initialize(runtime, io, options)
  @io = io
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



20
21
22
# File 'lib/cucumber/formatter/debug.rb', line 20

def method_missing(name, *args)
  print(name)
end

Instance Method Details

#log(message) ⇒ Object



11
12
13
14
# File 'lib/cucumber/formatter/debug.rb', line 11

def log(message)
  return unless ENV['DEBUG']
  @io.puts "* #{message}"
end

#puts(*args) ⇒ Object



24
25
26
# File 'lib/cucumber/formatter/debug.rb', line 24

def puts(*args)
  print("puts")
end

#respond_to?(*args) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/cucumber/formatter/debug.rb', line 16

def respond_to?(*args)
  true
end