module Hyperloop::Store::Mixin

Public Class Methods

included(base) click to toggle source
# File lib/hyperloop/store/mixin.rb, line 5
def included(base)
  base.include(HyperStore::InstanceMethods)
  base.extend(HyperStore::ClassMethods)
  base.extend(HyperStore::DispatchReceiver)

  base.singleton_class.define_singleton_method(:__state_wrapper) do
    @__state_wrapper ||= Class.new(HyperStore::StateWrapper)
  end

  base.singleton_class.define_singleton_method(:state) do |*args, &block|
    __state_wrapper.define_state_methods(base, *args, &block)
  end
end