Class Ruote::Context
In: lib/ruote/context.rb
Parent: Object

A sort of internal registry, via a shared instance of this class, the worker and the engine can access subservices like parser, treechecker, wfid_generator and so on.

Methods

Constants

SERVICE_PREFIX = /^s\_/

Attributes

engine  [RW] 
storage  [R] 
worker  [RW] 

Public Class methods

Public Instance methods

Used for things like

  if @context['ruby_eval_allowed']
    # ...
  end

Mostly used by engine#configure

A trick : in order to avoid

  @context = o.respond_to?(:context) ? o.context : o
  # or
  #@context = o.is_a?(Ruote::Context) ? o : o.context

simply letting a context say its context is itself.

Returns the engine_id (as set in the configuration under the key "engine_id"), or, by default, "engine".

Takes care of shutting down every service registered in this context.

Protected Instance methods

[Validate]