Sha256: 8d4905b1dabcef820f7a8bbfe165cd5278f40600bb0024499c24184e7253f52b

Contents?: true

Size: 279 Bytes

Versions: 9

Compression:

Stored size: 279 Bytes

Contents

require 'synchronisable/gateway'

class GatewayBase < Synchronisable::Gateway
  def id_key
    not_implemented! :id_key
  end

  def source
    not_implemented! :source
  end

  def fetch(params)
    source
  end

  def find(id)
    source.find { |h| h[id_key] == id }
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
synchronisable-1.3.1 spec/dummy/app/gateways/gateway_base.rb
synchronisable-1.3.0 spec/dummy/app/gateways/gateway_base.rb
synchronisable-1.2.7 spec/dummy/app/gateways/gateway_base.rb
synchronisable-1.2.6 spec/dummy/app/gateways/gateway_base.rb
synchronisable-1.2.5 spec/dummy/app/gateways/gateway_base.rb
synchronisable-1.2.4 spec/dummy/app/gateways/gateway_base.rb
synchronisable-1.2.3 spec/dummy/app/gateways/gateway_base.rb
synchronisable-1.2.2 spec/dummy/app/gateways/gateway_base.rb
synchronisable-1.2.1 spec/dummy/app/gateways/gateway_base.rb