Class: Lucid::StepDefinitionUsage

Inherits:
Object
  • Object
show all
Defined in:
lib/lucid/step_definition_usage.rb

Overview

Only used for keeping track of available and invoked step definitions.

Direct Known Subclasses

Formatter::Usage::StepDefKey

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(regexp_source, file_colon_line) ⇒ StepDefinitionUsage

Returns a new instance of StepDefinitionUsage.



6
7
8
# File 'lib/lucid/step_definition_usage.rb', line 6

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.



4
5
6
# File 'lib/lucid/step_definition_usage.rb', line 4

def file_colon_line
  @file_colon_line
end

#regexp_sourceObject (readonly)

Returns the value of attribute regexp_source.



4
5
6
# File 'lib/lucid/step_definition_usage.rb', line 4

def regexp_source
  @regexp_source
end

Instance Method Details

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/lucid/step_definition_usage.rb', line 10

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

#hashObject



14
15
16
# File 'lib/lucid/step_definition_usage.rb', line 14

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