Class: GreenPepper::WriteTextExampleResult

Inherits:
HtmlExampleResult show all
Defined in:
lib/greenpepper/writer/htmlresult.rb

Direct Known Subclasses

WriteIgnoredExampleResult

Instance Attribute Summary

Attributes inherited from HtmlExampleResult

#column, #row

Attributes inherited from ExampleResult

#silent

Instance Method Summary collapse

Methods inherited from ExampleResult

#error?, #failure?, #ignored?, #success?, #update_stats

Constructor Details

#initialize(result, silent = false) ⇒ WriteTextExampleResult

Returns a new instance of WriteTextExampleResult.



26
27
28
29
# File 'lib/greenpepper/writer/htmlresult.rb', line 26

def initialize(result, silent=false)
  super(silent)
  @result = result
end

Instance Method Details

#write(cell, options = {}) ⇒ Object



31
32
33
34
35
36
# File 'lib/greenpepper/writer/htmlresult.rb', line 31

def write(cell, options = {})
  cell.content = "" if cell.content == " "
  cell = super(cell, options)
  cell << @result
  cell
end