Class: TurnipFormatter::Resource::Step::Hook
- Inherits:
-
Object
- Object
- TurnipFormatter::Resource::Step::Hook
- Includes:
- FailureResult, PendingResult
- Defined in:
- lib/turnip_formatter/resource/step/hook.rb
Direct Known Subclasses
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
- #argument ⇒ Object
-
#initialize(example) ⇒ Hook
constructor
A new instance of Hook.
- #line ⇒ Object
- #status ⇒ Object
- #text ⇒ Object
Methods included from PendingResult
Methods included from FailureResult
#exceptions, #failed?, #set_exceptions
Constructor Details
#initialize(example) ⇒ Hook
Returns a new instance of Hook.
16 17 18 19 |
# File 'lib/turnip_formatter/resource/step/hook.rb', line 16 def initialize(example) @example = example @exceptions = [] end |
Instance Attribute Details
#example ⇒ Object (readonly)
Returns the value of attribute example.
11 12 13 |
# File 'lib/turnip_formatter/resource/step/hook.rb', line 11 def example @example end |
Instance Method Details
#argument ⇒ Object
40 41 42 |
# File 'lib/turnip_formatter/resource/step/hook.rb', line 40 def argument nil end |
#line ⇒ Object
36 37 38 |
# File 'lib/turnip_formatter/resource/step/hook.rb', line 36 def line -1 end |
#status ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/turnip_formatter/resource/step/hook.rb', line 21 def status case when failed? :failed when pending? :pending else :passed end end |
#text ⇒ Object
32 33 34 |
# File 'lib/turnip_formatter/resource/step/hook.rb', line 32 def text '' end |