Class: Cucumber::StepDefinitionLight

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

Overview

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).

Direct Known Subclasses

Formatter::Usage::StepDefKey

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(regexp_source, location) ⇒ StepDefinitionLight

Returns a new instance of StepDefinitionLight.



10
11
12
# File 'lib/cucumber/step_definition_light.rb', line 10

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

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



8
9
10
# File 'lib/cucumber/step_definition_light.rb', line 8

def location
  @location
end

#regexp_sourceObject (readonly)

Returns the value of attribute regexp_source.



8
9
10
# File 'lib/cucumber/step_definition_light.rb', line 8

def regexp_source
  @regexp_source
end

Instance Method Details

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/cucumber/step_definition_light.rb', line 14

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

#hashObject



18
19
20
# File 'lib/cucumber/step_definition_light.rb', line 18

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