Sha256: dd91759985faec6b4e46d731c9e0b4fd7346c3953a77225eff5ce0e91f3cdb07

Contents?: true

Size: 655 Bytes

Versions: 4

Compression:

Stored size: 655 Bytes

Contents

# frozen_string_literal: true

module Cucumber
  # TODO: pointless, ancient, kill with fire.
  # Only used for keeping track of available and invoked step definitions
  # in a way that also works for other programming languages (i.e. cuke4duke)
  # Used for reporting purposes only (usage formatter).
  class StepDefinitionLight
    attr_reader :regexp_source, :location

    def initialize(regexp_source, location)
      @regexp_source, @location = regexp_source, location
    end

    def eql?(o)
      regexp_source == o.regexp_source && location == o.location
    end

    def hash
      regexp_source.hash + 31 * location.to_s.hash
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
cucumber-3.2.0 lib/cucumber/step_definition_light.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/cucumber-3.1.2/lib/cucumber/step_definition_light.rb
cucumber-3.1.2 lib/cucumber/step_definition_light.rb
cucumber-3.1.1 lib/cucumber/step_definition_light.rb