Sha256: fc31eda4ee86a4ef9ca50ae79428371f6c2d3ec05ac8961cdc0b18ea1b1840b5
Contents?: true
Size: 763 Bytes
Versions: 1
Compression:
Stored size: 763 Bytes
Contents
require "i18n" module Shamu module JsonApi # A generic error class for problems with shamu JSON API. class Error < Shamu::Error private def translation_scope super.dup.insert( 1, :json_api ) end end # Raised if an {ResourceBuilder#identifier} was not built. class IncompleteResourceError < Error def initialize( message = :incomplete_resource ) super end end class IdentifierRequiredError < Error def initialize( message = :identifier_required ) super end end class NoPresenter < Error def initialize( resource, namespaces ) super translate( :no_presenter, class: resource.class, namespaces: namespaces ) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shamu-0.0.4 | lib/shamu/json_api/error.rb |