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



47
48
49
# File 'lib/rails/initializable.rb', line 47

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

#tsort_each_child(initializer, &block) ⇒ Object



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

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