module Smplkit::Audit::HttpMethod
def self.coerce(value)
-
(ArgumentError)- when +value+ is not a member of {VALUES}.
Returns:
-
(String, nil)- the canonical wire value (or +nil+ when input is +nil+).
Parameters:
-
value(String, nil) -- a published constant or its literal string.
def self.coerce(value) return nil if value.nil? s = value.to_s return s if VALUES.include?(s) raise ArgumentError, "Unknown HttpMethod #{value.inspect}; expected one of #{VALUES.inspect}" end