Module: StubRequests::Concerns::RegisterVerb
- Included in:
- Service
- Defined in:
- lib/stub_requests/concerns/register_verb.rb
Overview
Module RegisterVerb provides
Instance Method Summary collapse
-
#any(path, as:) ⇒ Endpoint
Convenience wrapper for register.
-
#delete(path, as:) ⇒ Endpoint
Register a :delete endpoint.
-
#get(path, as:) ⇒ Endpoint
Convenience wrapper for register.
-
#patch(path, as:) ⇒ Endpoint
Register a :patch endpoint.
-
#post(path, as:) ⇒ Endpoint
Register a :post endpoint.
-
#put(path, as:) ⇒ Endpoint
Register a :put endpoint.
Instance Method Details
#any(path, as:) ⇒ Endpoint
Convenience wrapper for register
. get("documents/:id", as: :documents_show)
25 26 27 |
# File 'lib/stub_requests/concerns/register_verb.rb', line 25 def any(path, as:) # rubocop:disable Naming/UncommunicativeMethodParamName register(as, __method__, path) end |
#delete(path, as:) ⇒ Endpoint
Register a :delete endpoint
. delete("documents/:id", as: :documents_destroy)
105 106 107 |
# File 'lib/stub_requests/concerns/register_verb.rb', line 105 def delete(path, as:) # rubocop:disable Naming/UncommunicativeMethodParamName register(as, __method__, path) end |
#get(path, as:) ⇒ Endpoint
Convenience wrapper for register
. get("documents/:id", as: :documents_show)
41 42 43 |
# File 'lib/stub_requests/concerns/register_verb.rb', line 41 def get(path, as:) # rubocop:disable Naming/UncommunicativeMethodParamName register(as, __method__, path) end |
#patch(path, as:) ⇒ Endpoint
Register a :patch endpoint
. patch("documents/:id", as: :documents_update)
73 74 75 |
# File 'lib/stub_requests/concerns/register_verb.rb', line 73 def patch(path, as:) # rubocop:disable Naming/UncommunicativeMethodParamName register(as, __method__, path) end |
#post(path, as:) ⇒ Endpoint
Register a :post endpoint
. post("documents", as: :documents_create)
57 58 59 |
# File 'lib/stub_requests/concerns/register_verb.rb', line 57 def post(path, as:) # rubocop:disable Naming/UncommunicativeMethodParamName register(as, __method__, path) end |
#put(path, as:) ⇒ Endpoint
Register a :put endpoint
. put("documents/:id", as: :documents_update)
89 90 91 |
# File 'lib/stub_requests/concerns/register_verb.rb', line 89 def put(path, as:) # rubocop:disable Naming/UncommunicativeMethodParamName register(as, __method__, path) end |