Sha256: c9aa141e6873b30a100cf486f2b76766406d5930ecb7153696c3d348f94c1011

Contents?: true

Size: 503 Bytes

Versions: 1

Compression:

Stored size: 503 Bytes

Contents

require 'lotus/model/error'

module Lotus
  module Model
    module Adapters
      # @since 0.2.0
      class NoAdapterError < Lotus::Model::Error
        def initialize(method_name)
          super("Cannot invoke `#{ method_name }' on repository. Please check if `adapter' and `mapping' are set.")
        end
      end

      # @since 0.2.0
      # @api private
      class NullAdapter
        def method_missing(m, *args)
          raise NoAdapterError.new(m)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lotus-model-0.5.1 lib/lotus/model/adapters/null_adapter.rb