Class: Cucumber::StepDefinitionLight

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

Overview

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, file_colon_line) ⇒ StepDefinitionLight

Returns a new instance of StepDefinitionLight.



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

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

Instance Attribute Details

#file_colon_lineObject (readonly)

Returns the value of attribute file_colon_line.



6
7
8
# File 'lib/cucumber/step_definition_light.rb', line 6

def file_colon_line
  @file_colon_line
end

#regexp_sourceObject (readonly)

Returns the value of attribute regexp_source.



6
7
8
# File 'lib/cucumber/step_definition_light.rb', line 6

def regexp_source
  @regexp_source
end

Instance Method Details

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/cucumber/step_definition_light.rb', line 12

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

#hashObject



16
17
18
# File 'lib/cucumber/step_definition_light.rb', line 16

def hash
  regexp_source.hash + 31*file_colon_line.hash
end