Sha256: e9ceb6e1ce4171093ccb5a362766d14179b64da2f3800113c86f663627ecb132

Contents?: true

Size: 893 Bytes

Versions: 7

Compression:

Stored size: 893 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
  
  # E.G.
  # MyHandler.register! (Marvin::Base subclass) or
  # Marvin::Settings.client.register_handler my_handler (a handler instance)
  
  # Register based on some setting you've added. e.g.:
  # 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::Handler.register!
  # else
  
  # end
  
  # And any other code here that will be run before the client, e.g:
  
  HelloWorld.register!
  DebugHandler.register!
  
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
Sutto-marvin-0.8.0.0 templates/setup.erb
Sutto-marvin-0.8.0.1 templates/setup.erb
marvin-0.8.2 templates/setup.erb
marvin-0.8.1 templates/setup.erb
marvin-0.8.0.2 templates/setup.erb
marvin-0.8.0.1 templates/setup.erb
marvin-0.8.0.0 templates/setup.erb