lib/surrogate/values.rb in surrogate-0.3.2 vs lib/surrogate/values.rb in surrogate-0.4.2

- old
+ new

@@ -5,12 +5,17 @@ class Value # convert raw arguments into a value def self.factory(*args, &block) arg = args.first + # if arg.kind_of? Exception + # Raiseable.new arg + # else + # MethodQueue.new args + # end if args.size > 1 - MethodQueue.new args + ValueQueue.new args elsif arg.kind_of? Exception Raisable.new arg elsif arg.kind_of? Value arg else @@ -43,10 +48,10 @@ raise @value end end - class MethodQueue < Value + class ValueQueue < Value QueueEmpty = Class.new StandardError def value(hatchling, method_name) factory(dequeue).value(hatchling, method_name) ensure