Module: ThreeScale::Backend::Storable

Overview

Mix this into objects that should be storable in the storage.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Methods included from StorageKeyHelpers

#encode_key

Class Method Details

.included(base) ⇒ Object



7
8
9
# File 'lib/3scale/backend/storable.rb', line 7

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#initialize(attributes = {}) ⇒ Object



11
12
13
14
15
# File 'lib/3scale/backend/storable.rb', line 11

def initialize(attributes = {})
  attributes.each do |key, value|
    send("#{key}=", value)
  end
end

#storageObject



17
18
19
# File 'lib/3scale/backend/storable.rb', line 17

def storage
  self.class.storage
end