Class: Rails::Initializable::Collection

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

Instance Method Summary (collapse)

Methods inherited from Array

#as_json, #encode_json, #extract_options!, #fifth, #forty_two, #fourth, #from, #in_groups, #in_groups_of, #sample, #second, #split, #third, #to, #to_formatted_s, #to_param, #to_query, #to_sentence, #to_xml, #uniq_by, #uniq_by!, wrap

Instance Method Details

- (Object) +(other)



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

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

- (Object) tsort_each_child(initializer, &block)



43
44
45
# File 'railties/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