Module: Dupe::Network::RestValidation

Included in:
Dupe::Network, Log
Defined in:
lib/superdupe/rest_validation.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#validate_request_type(verb) ⇒ Object



8
9
10
11
12
13
# File 'lib/superdupe/rest_validation.rb', line 8

def validate_request_type(verb)
  raise(
    Dupe::Network::UnknownRestVerbError,
    "Unknown REST verb ':#{verb}'. Valid REST verbs are :get, :post, :put, and :delete."
  ) unless Dupe::Network::VERBS.include?(verb)
end