Module: Hyperloop::Store::Mixin
- Defined in:
- lib/hyperloop/store/mixin.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# 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 |