Class: Cucumber::Hooks::AfterStepHook

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(location) ⇒ AfterStepHook

Returns a new instance of AfterStepHook.



90
91
92
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/hooks.rb', line 90

def initialize(location)
  @location = location
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



88
89
90
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/hooks.rb', line 88

def location
  @location
end

Instance Method Details

#describe_to(visitor, *args) ⇒ Object



106
107
108
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/hooks.rb', line 106

def describe_to(visitor, *args)
  visitor.after_step_hook(self, *args)
end

#match_locations?(queried_locations) ⇒ Boolean

Returns:

  • (Boolean)


102
103
104
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/hooks.rb', line 102

def match_locations?(queried_locations)
  queried_locations.any? { |other_location| other_location.match?(location) }
end

#textObject



94
95
96
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/hooks.rb', line 94

def text
  'AfterStep hook'
end

#to_sObject



98
99
100
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/hooks.rb', line 98

def to_s
  "#{text} at #{location}"
end