Sha256: d27f81d893efcf4bae2769b3738c1a4d2722acee3a970f7ede780d4524e263a6

Contents?: true

Size: 566 Bytes

Versions: 5

Compression:

Stored size: 566 Bytes

Contents

module Jsonatra
  module ErrorHelpers

    # sets a default root error type and message if not present, and appends this
    # error to the list for this parameter
    #
    def param_error parameter, type, message, &block
      response.add_parameter_error parameter.to_sym, type, message, &block
    end

    # sets a default root error type and message if not present, and appends this
    # error to the list for this header
    #
    def header_error header, type, message, &block
      response.add_header_error header, type, message, &block
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
jsonatra-1.0.7 lib/jsonatra/helpers/error.rb
jsonatra-1.0.5 lib/jsonatra/helpers/error.rb
jsonatra-1.0.4 lib/jsonatra/helpers/error.rb
jsonatra-1.0.3 lib/jsonatra/helpers/error.rb
jsonatra-1.0.2 lib/jsonatra/helpers/error.rb