Module: Octiron::World::ClassMethods

Included in:
Octiron::World
Defined in:
lib/octiron/world.rb

Overview

Modules also can have class methods

Instance Method Summary collapse

Instance Method Details

#event_busOctiron::Events::Bus

Singleton event bus

Returns:



33
34
35
36
37
38
# File 'lib/octiron/world.rb', line 33

def event_bus
  if @event_bus.nil?
    @event_bus = ::Octiron::Events::Bus.new
  end
  return @event_bus
end

#transmogrifier_registryOctiron::Transmogrifiers::Registry

Singleton transmogrifier registry

Returns:



23
24
25
26
27
28
# File 'lib/octiron/world.rb', line 23

def transmogrifier_registry
  if @transmogrifier_registry.nil?
    @transmogrifier_registry = ::Octiron::Transmogrifiers::Registry.new
  end
  return @transmogrifier_registry
end