Class: Cucumber::Hooks::BeforeHook
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
- #name ⇒ Object
Constructor Details
#initialize(location) ⇒ BeforeHook
Returns a new instance of BeforeHook.
61 62 63 |
# File 'lib/cucumber/hooks.rb', line 61 def initialize(location) @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
59 60 61 |
# File 'lib/cucumber/hooks.rb', line 59 def location @location end |
Instance Method Details
#describe_to(visitor, *args) ⇒ Object
73 74 75 |
# File 'lib/cucumber/hooks.rb', line 73 def describe_to(visitor, *args) visitor.before_hook(self, *args) end |
#match_locations?(queried_locations) ⇒ Boolean
69 70 71 |
# File 'lib/cucumber/hooks.rb', line 69 def match_locations?(queried_locations) queried_locations.any? { |other_location| other_location.match?(location) } end |
#name ⇒ Object
65 66 67 |
# File 'lib/cucumber/hooks.rb', line 65 def name "Before hook" end |