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, location) ⇒ StepDefKey

Returns a new instance of StepDefKey.



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

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

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



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

def location
  @location
end

#mean_durationObject

Returns the value of attribute mean_duration.



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

def mean_duration
  @mean_duration
end

#regexp_sourceObject (readonly)

Returns the value of attribute regexp_source.



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

def regexp_source
  @regexp_source
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#hashObject



24
25
26
# File 'lib/cucumber/formatter/usage.rb', line 24

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