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


42
43
44
# File 'lib/rails/initializable.rb', line 42

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

#tsort_each_child(initializer, &block) ⇒ Object


38
39
40
# File 'lib/rails/initializable.rb', line 38

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