Class: GreenPepper::AskSuccess
- Inherits:
-
ExampleResult
- Object
- ExampleResult
- GreenPepper::AskSuccess
- Includes:
- KeywordFormat
- Defined in:
- lib/greenpepper/writer/freetextresult.rb
Instance Attribute Summary collapse
-
#answer ⇒ Object
Returns the value of attribute answer.
Attributes inherited from ExampleResult
Instance Method Summary collapse
-
#initialize(answer) ⇒ AskSuccess
constructor
A new instance of AskSuccess.
- #success? ⇒ Boolean
- #write(action) ⇒ Object
Methods included from KeywordFormat
#error, #green_highlight, #grey_highlight, #highlight, #indent, #indent2, #newline, #red_highlight, #yellow_highlight
Methods inherited from ExampleResult
#error?, #failure?, #ignored?, #update_stats
Constructor Details
#initialize(answer) ⇒ AskSuccess
Returns a new instance of AskSuccess.
138 139 140 |
# File 'lib/greenpepper/writer/freetextresult.rb', line 138 def initialize(answer) @answer = answer end |
Instance Attribute Details
#answer ⇒ Object
Returns the value of attribute answer.
136 137 138 |
# File 'lib/greenpepper/writer/freetextresult.rb', line 136 def answer @answer end |
Instance Method Details
#success? ⇒ Boolean
146 147 148 |
# File 'lib/greenpepper/writer/freetextresult.rb', line 146 def success? true end |
#write(action) ⇒ Object
142 143 144 |
# File 'lib/greenpepper/writer/freetextresult.rb', line 142 def write(action) action + indent("Answer: " + grey_highlight(@answer)) end |