You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

step_definition_light.rb 673 B

2 years ago
123456789101112131415161718192021222324
  1. # frozen_string_literal: true
  2. module Cucumber
  3. # TODO: pointless, ancient, kill with fire.
  4. # Only used for keeping track of available and invoked step definitions
  5. # in a way that also works for other programming languages (i.e. cuke4duke)
  6. # Used for reporting purposes only (usage formatter).
  7. class StepDefinitionLight
  8. attr_reader :regexp_source, :location
  9. def initialize(regexp_source, location)
  10. @regexp_source = regexp_source
  11. @location = location
  12. end
  13. def eql?(other)
  14. regexp_source == other.regexp_source && location == other.location
  15. end
  16. def hash
  17. regexp_source.hash + 31 * location.to_s.hash
  18. end
  19. end
  20. end

No Description

Contributors (1)