Module: Eldritch

Defined in:
lib/eldritch/dsl.rb,
lib/eldritch/safe.rb,
lib/eldritch/task.rb,
lib/eldritch/group.rb,
lib/eldritch/version.rb,
lib/eldritch/interrupted_error.rb

Defined Under Namespace

Modules: DSL Classes: Group, InterruptedError, NilGroup, Task

Constant Summary collapse

VERSION =
'1.1.3'.freeze

Class Method Summary collapse

Class Method Details

.inject_dslObject

Injects the DSL in the main

This is automatically called when you call

require 'eldritch'

If you do not want to contaminate the main you can require eldritch/safe and include or extend Eldricth::DSL yourself.

require 'eldritch/safe'
module Sandbox
  include Eldritch::DSL  # for async blocks, together and sync
  extend Eldritch::DSL   # for async method declaration
end


22
23
24
# File 'lib/eldritch/safe.rb', line 22

def self.inject_dsl
  Object.send :include, Eldritch::DSL
end