Sha256: 6558b6b8ee4f1974f5a7a653b1930f650a90f7f2bf58e22c96e9af092a45afd5

Contents?: true

Size: 551 Bytes

Versions: 1

Compression:

Stored size: 551 Bytes

Contents

module Stimul8
  module Component
    module Storage
      extend ActiveSupport::Concern

      class << self
        def storage_engine
          @@storage_engine ||= Stimul8::Storage::InMemory.new
        end
      end

      protected

      def write property_name, value
        storage_engine.write component_id, property_name, value
      end

      def read property_name
        storage_engine.read component_id, property_name
      end

      def storage_engine
        Stimul8::Component::Storage.storage_engine
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stimul8-0.1.0 lib/stimul8/component/storage.rb