Sha256: 4cdc73208062f8726b94eda3ba84f1c5fda0d9332edb3f307220d6ec2cf49eef

Contents?: true

Size: 414 Bytes

Versions: 4

Compression:

Stored size: 414 Bytes

Contents

module Synchronisable
  class Gateway
    attr_reader :synchronizer

    def initialize(synchronizer)
      @synchronizer = synchronizer
    end

    def fetch
      not_implemented :fetch
    end

    def find(id)
      not_implemented :find
    end

    protected

    def not_implemented(method)
      raise NotImplementedError,
        I18n.t('errors.gateway_method_missing', method: method)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
synchronisable-0.0.8 lib/synchronisable/gateway.rb
synchronisable-0.0.7 lib/synchronisable/gateway.rb
synchronisable-0.0.6 lib/synchronisable/gateway.rb
synchronisable-0.0.5 lib/synchronisable/gateway.rb