Sha256: 5451d57f6f3e4f27c84c63a2bad6befa040dd695bf6e87eafc8cf14bc9277d73

Contents?: true

Size: 527 Bytes

Versions: 1

Compression:

Stored size: 527 Bytes

Contents

module Esplanade
  class Request
    class Error
      def self.unsuitable(message)
        status = '400'
        headers = { 'Content-Type' => 'application/json; charset=utf-8' }
        body = [MultiJson.dump(error: [message[2..-3]])]
        [status, headers, body]
      end

      def self.not_documented
        status = '400'
        headers = { 'Content-Type' => 'application/json; charset=utf-8' }
        body = [MultiJson.dump(error: ['Not documented'])]
        [status, headers, body]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
esplanade-0.1.0 lib/esplanade/request/error.rb