Module: Methodical

Defined in:
lib/methodical/dsl.rb,
lib/methodical/modifier.rb,
lib/methodical/checklist.rb,
lib/methodical/executable.rb,
lib/methodical/action_item.rb,
lib/methodical/disposition.rb,
lib/methodical/walkthrough.rb,
lib/methodical/simple_action_item.rb

Defined Under Namespace

Modules: DSL, Executable Classes: ActionItem, Checklist, Disposition, Modifier, SimpleActionItem, Walkthrough

Class Method Summary collapse

Class Method Details

.Disposition(*args) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/methodical/disposition.rb', line 4

def self.Disposition(*args)
  if args.size == 1
    object = args.first
    if Disposition === object
      object
    elsif object.kind_of?(Array)     && 
        object.size >= 2             &&
        object[0].kind_of?(Symbol)   &&
        object[1].kind_of?(String)
      Disposition.new(object)
    else
      Disposition.new([:succeeded, "", object])
    end
  else
    Disposition.new(args)
  end
end