Class: TurnipFormatter::Resource::Step::Step
- Inherits:
-
Object
- Object
- TurnipFormatter::Resource::Step::Step
- Extended by:
- Forwardable
- Includes:
- FailureResult, PendingResult
- Defined in:
- lib/turnip_formatter/resource/step/step.rb
Instance Attribute Summary collapse
-
#example ⇒ Object
readonly
Returns the value of attribute example.
Attributes included from PendingResult
#pending_location, #pending_message
Instance Method Summary collapse
- #executed? ⇒ Boolean
-
#initialize(example, raw) ⇒ Step
constructor
A new instance of Step.
- #mark_as_executed ⇒ Object
- #status ⇒ Object
Methods included from PendingResult
Methods included from FailureResult
#exceptions, #failed?, #set_exceptions
Constructor Details
#initialize(example, raw) ⇒ Step
Returns a new instance of Step.
21 22 23 24 25 |
# File 'lib/turnip_formatter/resource/step/step.rb', line 21 def initialize(example, raw) @example = example @raw = raw @executed = false end |
Instance Attribute Details
#example ⇒ Object (readonly)
Returns the value of attribute example.
15 16 17 |
# File 'lib/turnip_formatter/resource/step/step.rb', line 15 def example @example end |
Instance Method Details
#executed? ⇒ Boolean
31 32 33 |
# File 'lib/turnip_formatter/resource/step/step.rb', line 31 def executed? @executed end |
#mark_as_executed ⇒ Object
27 28 29 |
# File 'lib/turnip_formatter/resource/step/step.rb', line 27 def mark_as_executed @executed = true end |
#status ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/turnip_formatter/resource/step/step.rb', line 35 def status case when failed? :failed when pending? :pending when executed? :passed else :unexecute end end |