Sha256: d2bc23a32947335891c3094d638350d6e643d251d8542abe6a4bbe002dd19c04

Contents?: true

Size: 390 Bytes

Versions: 14

Compression:

Stored size: 390 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

14 entries across 14 versions & 1 rubygems

Version Path
dyndnsd-1.6.1 spec/support/dummy_database.rb
dyndnsd-1.6.0 spec/support/dummy_database.rb
dyndnsd-1.5.0 spec/support/dummy_database.rb
dyndnsd-1.4.0 spec/support/dummy_database.rb
dyndnsd-1.3.0 spec/support/dummy_database.rb
dyndnsd-1.2.2 spec/support/dummy_database.rb
dyndnsd-1.2.1 spec/support/dummy_database.rb
dyndnsd-1.2.0 spec/support/dummy_database.rb
dyndnsd-1.1.0 spec/support/dummy_database.rb
dyndnsd-1.0.0 spec/support/dummy_database.rb
dyndnsd-0.0.4 spec/support/dummy_database.rb
dyndnsd-0.0.3 spec/support/dummy_database.rb
dyndnsd-0.0.2 spec/support/dummy_database.rb
dyndnsd-0.0.1 spec/support/dummy_database.rb