Class: RSpec::Retryable::Metadata

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/retryable/metadata.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attemptsObject



8
9
10
# File 'lib/rspec/retryable/metadata.rb', line 8

def attempts
  @attempts ||= 0
end

#failuresObject



18
19
20
# File 'lib/rspec/retryable/metadata.rb', line 18

def failures
  @failures ||= []
end

#retryObject



12
13
14
15
16
# File 'lib/rspec/retryable/metadata.rb', line 12

def retry
  return @retry if defined?(@retry)

  @retry = false
end

Instance Method Details

#to_hObject



22
23
24
25
26
27
28
# File 'lib/rspec/retryable/metadata.rb', line 22

def to_h
  {
    attempts: attempts,
    retry: @retry,
    failures: failures,
  }
end