Module: Ambit

Defined in:
lib/ambit.rb

Defined Under Namespace

Classes: ChoicesExhausted, Generator

Constant Summary collapse

VERSION =
'0.13'
Default_Generator =

The default generator used by Ambit.choose, Ambit.fail!, et al. should not be used directly.

Generator.new

Class Method Summary collapse

Class Method Details

.method_missing(sym, *args, &block) ⇒ Object

forward method invocations on this module to the default Generator.



160
161
162
# File 'lib/ambit.rb', line 160

def self.method_missing(sym, *args, &block) # :nodoc:
  Ambit::Default_Generator.send(sym, *args, &block)
end

.trace(lvl = false) ⇒ Object

Turn on tracing (to standard error) of Ambit operations

See “Watching Ambit Work” in README.rdoc

The optional level argument sets the verbosity – if not passed, each call to this method increases verbosity



147
148
149
# File 'lib/ambit.rb', line 147

def self.trace lvl = false
  Generator::trace lvl
end

.untraceObject

Turn off tracing (to standard error) of Ambit operations

See “Watching Ambit Work” in README.rdoc



155
156
157
# File 'lib/ambit.rb', line 155

def self.untrace
  Generator::untrace
end