Sha256: 2d2de43978bdac37aa3961c4b1d997fda9380fe3456c0bf7d88db968139de78e

Contents?: true

Size: 410 Bytes

Versions: 3

Compression:

Stored size: 410 Bytes

Contents

motion_require 'yapper'

module Yapper::Config
  COLLECTION = '_config'
  extend self

  mattr_accessor :db_version

  def self.get(key)
    Yapper::DB.instance.execute do |txn|
      txn.objectForKey(key.to_s, inCollection: '_config') 
    end
  end

  def self.set(key, value)
      Yapper::DB.instance.execute do |txn|
        txn.setObject(value, forKey: key, inCollection: COLLECTION)
      end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
motion-yapper-0.1.0 lib/yapper/config.rb
motion-yapper-0.0.3 lib/yapper/config.rb
motion-yapper-0.0.2 lib/yapper/config.rb