Class: Cucumber::Hooks::BeforeHook
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/hooks.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
- #describe_to(visitor, *args) ⇒ Object
-
#initialize(location) ⇒ BeforeHook
constructor
A new instance of BeforeHook.
- #match_locations?(queried_locations) ⇒ Boolean
- #text ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(location) ⇒ BeforeHook
Returns a new instance of BeforeHook.
66 67 68 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/hooks.rb', line 66 def initialize(location) @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
64 65 66 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/hooks.rb', line 64 def location @location end |
Instance Method Details
#describe_to(visitor, *args) ⇒ Object
82 83 84 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/hooks.rb', line 82 def describe_to(visitor, *args) visitor.before_hook(self, *args) end |
#match_locations?(queried_locations) ⇒ Boolean
78 79 80 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/hooks.rb', line 78 def match_locations?(queried_locations) queried_locations.any? { |other_location| other_location.match?(location) } end |
#text ⇒ Object
70 71 72 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/hooks.rb', line 70 def text 'Before hook' end |
#to_s ⇒ Object
74 75 76 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/hooks.rb', line 74 def to_s "#{text} at #{location}" end |