Sha256: c83350e7b6cab3ff37945d1cea50bc5bf8ae0c7b24e14d9dd2b89c27f5f149a1

Contents?: true

Size: 349 Bytes

Versions: 10

Compression:

Stored size: 349 Bytes

Contents

module Grape
  module Exceptions
    class Base < StandardError
      attr_reader :status, :message, :headers

      def initialize(args = {})
        @status = args[:status] || nil
        @message = args[:message] || nil
        @headers = args[:headers] || nil
      end

      def [](index)
        self.send(index)
      end 
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
grape-0.2.6 lib/grape/exceptions/base.rb
grape-0.2.5 lib/grape/exceptions/base.rb
grape-0.2.4 lib/grape/exceptions/base.rb
grape-0.2.3 lib/grape/exceptions/base.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/grape-0.2.2/lib/grape/exceptions/base.rb
fragrant-0.0.4 vendor/grape/lib/grape/exceptions/base.rb
grape-0.2.2 lib/grape/exceptions/base.rb
fragrant-0.0.3 vendor/grape/lib/grape/exceptions/base.rb
fragrant-0.0.2 vendor/grape/lib/grape/exceptions/base.rb
fragrant-0.0.1 vendor/grape/lib/grape/exceptions/base.rb