Class: GreenPepper::ActionError

Inherits:
KeywordError show all
Defined in:
lib/greenpepper/writer/freetextresult.rb

Instance Attribute Summary collapse

Attributes inherited from ExampleResult

#silent

Instance Method Summary collapse

Methods inherited from KeywordError

#error?, #update_stats

Methods included from KeywordFormat

#error, #green_highlight, #grey_highlight, #highlight, #indent, #indent2, #newline, #red_highlight, #yellow_highlight

Methods inherited from ExampleResult

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

Constructor Details

#initialize(exception) ⇒ ActionError

Returns a new instance of ActionError.



195
196
197
# File 'lib/greenpepper/writer/freetextresult.rb', line 195

def initialize(exception)
  @exception = exception
end

Instance Attribute Details

#exceptionObject (readonly)

Returns the value of attribute exception.



193
194
195
# File 'lib/greenpepper/writer/freetextresult.rb', line 193

def exception
  @exception
end

Instance Method Details

#write(action) ⇒ Object



199
200
201
202
# File 'lib/greenpepper/writer/freetextresult.rb', line 199

def write(action)
  newline(yellow_highlight(action)) + 
    error(@exception)
end