Class: GreenPepper::WriteSurplusExampleResult
- Inherits:
-
FailureExampleResult
- Object
- ExampleResult
- HtmlExampleResult
- FailureExampleResult
- GreenPepper::WriteSurplusExampleResult
- Defined in:
- lib/greenpepper/writer/htmlresult.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from HtmlExampleResult
Attributes inherited from ExampleResult
Instance Method Summary collapse
-
#initialize(value, silent = false) ⇒ WriteSurplusExampleResult
constructor
A new instance of WriteSurplusExampleResult.
- #write(cell, options = {}) ⇒ Object
Methods inherited from FailureExampleResult
Methods inherited from ExampleResult
#error?, #failure?, #ignored?, #success?, #update_stats
Constructor Details
#initialize(value, silent = false) ⇒ WriteSurplusExampleResult
Returns a new instance of WriteSurplusExampleResult.
176 177 178 179 |
# File 'lib/greenpepper/writer/htmlresult.rb', line 176 def initialize(value, silent=false) super(silent) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
175 176 177 |
# File 'lib/greenpepper/writer/htmlresult.rb', line 175 def value @value end |
Instance Method Details
#write(cell, options = {}) ⇒ Object
181 182 183 184 185 186 187 188 189 |
# File 'lib/greenpepper/writer/htmlresult.rb', line 181 def write(cell, = {}) super(cell, ) surplus = LibXML::XML::Node.new('i') surplus << "Surplus " cell.content = "" cell << surplus cell << @value end |