Module: ThreeScale::Backend::Storable
- Includes:
- StorageKeyHelpers
- Included in:
- AlertLimit, Application, Metric, Metric::Collection, Service, ServiceToken, ThreeScale::Backend::Stats::Cleaner, UsageLimit
- Defined in:
- lib/3scale/backend/storable.rb
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
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 |
#storage ⇒ Object
17 18 19 |
# File 'lib/3scale/backend/storable.rb', line 17 def storage self.class.storage end |