Module: Urist

Defined in:
lib/urist.rb,
lib/urist/base.rb,
lib/urist/runner.rb,
lib/urist/scenario.rb,
lib/urist/uber_waffel.rb

Overview

How to use: ==

  1. Fetch all the data you need:

client   = Client.needed_now # instance of some class
price    = 10000.65          # numbers
products = client.products   # arrays
  1. Assemble them into hash:

information = {:client => client, :price => price, :products => products}
  1. Create new runner and, well, run it:

runner = Urist.new(:startup_scenario => NewAndLongScenario, :information => information)
result = runner.go!
  1. Extract the decision and other parameters from result:

decision    = result[:decision]
description = result[:description]
limit       = result[:limit]
  1. Capture all execution logs

log = runner.logs # array with all results
  1. Summarize all executed scenarios

scenarios = runner.scenarios # array with all executed scenarios
  1. You’re done!

Defined Under Namespace

Modules: UberWaffel Classes: Base, Runner, Scenario

Class Method Summary collapse

Class Method Details

.new(options = {}) ⇒ Object



34
35
36
# File 'lib/urist.rb', line 34

def self.new options={}
  Base.new options
end