lib/ceml/script.rb in ceml-0.4.0 vs lib/ceml/script.rb in ceml-0.5.0
- old
+ new
@@ -7,15 +7,13 @@
# ===========
# = casting =
# ===========
# public
- def post candidate
+ def post candidate, locs
return unless candidate = candidate.dup.load(awaited_criteria)
- delegate.with_locations(self) do |locs|
- locs.each{ |l| l.push candidate }
- locs << CastingLocation.create(self, candidate) if locs.none?(&:added)
- end
+ locs.each{ |l| l.push candidate }
+ locs << CastingLocation.create(self, candidate) if locs.none?(&:added)
end
def awaited_criteria
return [] unless cast.type == :await
return cast.criteria(self)