1645: def resolve_args(args)
1646: task_name = args.shift
1647: arg_names = args
1648: needs = []
1649: if task_name.is_a?(Hash)
1650: hash = task_name
1651: task_name = hash.keys[0]
1652: needs = hash[task_name]
1653: end
1654: if arg_names.last.is_a?(Hash)
1655: hash = arg_names.pop
1656: needs = hash[:needs]
1657: fail "Unrecognized keys in task hash: #{hash.keys.inspect}" if hash.size > 1
1658: end
1659: needs = [needs] unless needs.respond_to?(:to_ary)
1660: [task_name, arg_names, needs]
1661: end