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



51
52
53
# File 'lib/rails/initializable.rb', line 51

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

#tsort_each_child(initializer, &block) ⇒ Object



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

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