Class: Jbr::Mock::Request

Inherits:
Request show all
Defined in:
lib/jbr/mock/request.rb

Overview

A request that records what Jbr.mock was told to answer.

Constant Summary

Constants inherited from Request

Request::CREATE

Instance Attribute Summary

Attributes inherited from Request

#client_id

Attributes inherited from Resource

#id

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Jbr::Resource

Instance Method Details

#create(_) ⇒ Mock::Request

Returns itself, carrying the mocked IDs.

Returns:



5
6
7
8
9
10
# File 'lib/jbr/mock/request.rb', line 5

def create(_)
  @id = Jbr.mock.request[:id]
  @client_id = Jbr.mock.request[:client_id]

  self
end