Module: Ruote::Cukes

Defined in:
lib/ruote/cukes.rb,
lib/ruote/cukes/version.rb

Overview

a variable container in a singleton, or something like that

Constant Summary collapse

VERSION =
'2.1.9'

Class Method Summary collapse

Class Method Details

.method_missing(m, *args) ⇒ Object



41
42
43
44
45
46
47
48
49
50
# File 'lib/ruote/cukes.rb', line 41

def self.method_missing (m, *args)
  m = m.to_s
  if args.size == 1 && mm = m.match(/^(.+)=$/)
    (@vars ||= {})[mm[1]] = args.first
  elsif args.size == 0
    (@vars ||= {})[m]
  else
    super
  end
end

.workitemObject



52
53
54
55
56
57
58
59
60
61
# File 'lib/ruote/cukes.rb', line 52

def self.workitem

  if wi = @vars['workitem']
    return wi
  end

  wi = @vars['storage_participant'].first

  @vars['workitem'] = wi
end