Sha256: 757a21762291f44561b95a3184a321cb57cc1e0279270f3f4480bb3020ab0df4

Contents?: true

Size: 221 Bytes

Versions: 7

Compression:

Stored size: 221 Bytes

Contents

module Napa
  module ErrorPresenter
    def present_error(code, message = '')
      Napa::JsonError.new(code, message)
    end

    # extend all endpoints to include this
    Grape::Endpoint.send :include, self
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
napa-0.1.29 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.28 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.26 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.25 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.24 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.23 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.22 lib/napa/grape_extensions/error_presenter.rb