Class: Cucumber::Formatter::Usage::StepDefKey

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(regexp_source, file_colon_line) ⇒ StepDefKey

Returns a new instance of StepDefKey.



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

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.



9
10
11
# File 'lib/cucumber/formatter/usage.rb', line 9

def file_colon_line
  @file_colon_line
end

#mean_durationObject

Returns the value of attribute mean_duration.



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

def mean_duration
  @mean_duration
end

#regexp_sourceObject (readonly)

Returns the value of attribute regexp_source.



9
10
11
# File 'lib/cucumber/formatter/usage.rb', line 9

def regexp_source
  @regexp_source
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

Instance Method Details

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#hashObject



20
21
22
# File 'lib/cucumber/formatter/usage.rb', line 20

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