Class: Rails::Initializable::Collection

Inherits:
Array
  • Object
show all
Includes:
TSort
Defined in:
lib/rails/initializable.rb

Instance Method Summary collapse

Instance Method Details

#+(other) ⇒ Object



53
54
55
# File 'lib/rails/initializable.rb', line 53

def +(other)
  Collection.new(to_a + other.to_a)
end

#tsort_each_child(initializer, &block) ⇒ Object



49
50
51
# File 'lib/rails/initializable.rb', line 49

def tsort_each_child(initializer, &block)
  select { |i| i.before == initializer.name || i.name == initializer.after }.each(&block)
end