lib/adhearsion/plugin/collection.rb in adhearsion-2.0.0.beta1 vs lib/adhearsion/plugin/collection.rb in adhearsion-2.0.0.rc1
- old
+ new
@@ -1,15 +1,17 @@
+# encoding: utf-8
+
require 'tsort'
module Adhearsion
class Plugin
class Collection < Array
include TSort
alias :tsort_each_node :each
def tsort_each_child(child, &block)
- select { |i| i.before == child.name || i.name == child.after }.each &block
+ select { |i| i.before == child.name || i.name == child.after }.each(&block)
end
def +(other)
Collection.new(to_a + other.to_a)
end