Sha256: 0216ef863ce07ba50ca98c4149c4581964895c529ecd1b828e68270aef402edc

Contents?: true

Size: 981 Bytes

Versions: 8

Compression:

Stored size: 981 Bytes

Contents

# Is loaded on setup / when handlers need to be
# registered. Use it to register handlers / do
# any repeatable setup that will happen before
# any connections are created
Marvin::Loader.before_run do
  
  # Want a non-default namespace? Choose something simple
  # Marvin::Settings.distributed_namespace = :some_namespace
  
  # E.G.
  # MyHandler.register! (Marvin::Base subclass) or
  # Marvin::Settings.default_client.register_handler my_handler (a handler instance)
  
  # Register in ruby
  #
  # LoggingHandler.register! if Marvin::Settings.use_logging
  
  # Conditional registration - load the distributed dispatcher
  # if an actual client, otherwise use the normal handlers.
  #
  # if Marvin::Loader.distributed_client?
  #   HelloWorld.register!
  #   DebugHandler.register!
  # else
  #   Marvin::Distributed::DispatchHandler.register!
  # end
  
  # And any other code here that will be run before the client
  
  HelloWorld.register!
  DebugHandler.register!
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
Sutto-marvin-0.2.2 config/setup.rb
Sutto-marvin-0.2.3 config/setup.rb
Sutto-marvin-0.2.4 config/setup.rb
Sutto-marvin-0.3.0 config/setup.rb
Sutto-marvin-0.3.2 config/setup.rb
Sutto-marvin-0.3.3 config/setup.rb
Sutto-marvin-0.3.4 config/setup.rb
Sutto-marvin-0.4.0 config/setup.rb