Exception: StubRequests::UriSegmentMismatch

Inherits:
Error
  • Object
show all
Defined in:
lib/stub_requests/exceptions.rb

Overview

UriSegmentMismatch is raised when a segment cannot be replaced

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri:, expected_keys:, received_keys:) ⇒ UriSegmentMismatch

Returns a new instance of UriSegmentMismatch

Since:

  • 0.1.0



99
100
101
102
103
104
105
# File 'lib/stub_requests/exceptions.rb', line 99

def initialize(uri:, expected_keys:, received_keys:)
  @uri           = uri
  @expected_keys = expected_keys
  @received_keys = received_keys

  super(message_parts.join("\n  "))
end

Instance Attribute Details

#expected_keysObject (readonly)

Since:

  • 0.1.0



98
99
100
# File 'lib/stub_requests/exceptions.rb', line 98

def expected_keys
  @expected_keys
end

#received_keysObject (readonly)

Since:

  • 0.1.0



98
99
100
# File 'lib/stub_requests/exceptions.rb', line 98

def received_keys
  @received_keys
end

#uriObject (readonly)

Since:

  • 0.1.0



98
99
100
# File 'lib/stub_requests/exceptions.rb', line 98

def uri
  @uri
end