Class: Cucumber::Hooks::AfterHook

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/hooks.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location) ⇒ AfterHook

Returns a new instance of AfterHook.



39
40
41
# File 'lib/cucumber/hooks.rb', line 39

def initialize(location)
  @location = location
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



37
38
39
# File 'lib/cucumber/hooks.rb', line 37

def location
  @location
end

Instance Method Details

#describe_to(visitor, *args) ⇒ Object



51
52
53
# File 'lib/cucumber/hooks.rb', line 51

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

#match_locations?(queried_locations) ⇒ Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/cucumber/hooks.rb', line 47

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

#nameObject



43
44
45
# File 'lib/cucumber/hooks.rb', line 43

def name
  "After hook"
end