Sha256: 777d311f0bfe5f471d2a76152c7fc4859050207e7c322ec7d1b782fc63ad8388

Contents?: true

Size: 369 Bytes

Versions: 3

Compression:

Stored size: 369 Bytes

Contents

require "easy_key_value/key_value_store"
require "easy_key_value/class_methods"

module EKV
  module ModelExtensions

    def self.included(base)
      base.send(:extend, EKV::ClassMethods)
    end
  end

  module ClassMethods

    # Marks the model as a key / value store
    def acts_as_key_value_store
      include ModelExtensions::KeyValueStore
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
easy_key_value-0.1.2 lib/easy_key_value/model_extensions.rb
easy_key_value-0.1.1 lib/easy_key_value/model_extensions.rb
easy_key_value-0.1.0 lib/easy_key_value/model_extensions.rb