Sha256: 63404470b6f2825432bd89e49d5aa406b4c7b2e1a072a521be744a9c154c5ed4

Contents?: true

Size: 464 Bytes

Versions: 2

Compression:

Stored size: 464 Bytes

Contents

module ThinRest
  module Resources
    class ResourceNotFound < Resource
      class << self
        def default_handler(env, name)
          new(env)
        end
      end

      property :name
      def get
        connection.send_head(404)
        connection.send_body(Representations::ResourceNotFound.new(self).to_s) do
          raise RoutingError, "Invalid route: #{connection.rack_request.path_info} ; name: #{name}"
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pivotal-screw-unit-0.4.0 vendor/js-test-core/vendor/thin-rest/lib/thin_rest/resources/resource_not_found.rb
pivotal-screw-unit-0.4.1 vendor/js-test-core/vendor/thin-rest/lib/thin_rest/resources/resource_not_found.rb