Sha256: 61794ccd048665b56120660ced1169904f4ef504427f505041f47802ceeae13a

Contents?: true

Size: 380 Bytes

Versions: 5

Compression:

Stored size: 380 Bytes

Contents

require 'forwardable'

module Dyndnsd
  class DummyDatabase
    extend Forwardable

    def_delegators :@db, :[], :[]=, :each, :has_key?

    def initialize(db_init)
      @db_init = db_init
    end

    def load
      @db = @db_init
      @db_hash = @db.hash
    end

    def save
      @db_hash = @db.hash
    end

    def changed?
      @db_hash != @db.hash
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dyndnsd-2.1.1 spec/support/dummy_database.rb
dyndnsd-2.1.0 spec/support/dummy_database.rb
dyndnsd-2.0.0 spec/support/dummy_database.rb
dyndnsd-2.0.0.rc2 spec/support/dummy_database.rb
dyndnsd-2.0.0.rc1 spec/support/dummy_database.rb