Sha256: e8882722f89cfeff35740870fac5949634e92dcbfc3ce216f832b0b1f601a920

Contents?: true

Size: 220 Bytes

Versions: 13

Compression:

Stored size: 220 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

13 entries across 13 versions & 1 rubygems

Version Path
napa-0.1.21 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.20 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.19 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.18 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.17 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.16 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.15 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.14 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.12 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.13 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.11 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.10 lib/napa/grape_extensions/error_presenter.rb
napa-0.1.7 lib/napa/grape_extensions/error_presenter.rb