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, #deep_dup, #excluding, #extract!, #extract_options!, #fifth, #forty_two, #fourth, #from, #in_groups, #in_groups_of, #including, #inquiry, #second, #second_to_last, #split, #third, #third_to_last, #to, #to_fs, #to_param, #to_query, #to_sentence, #to_xml, wrap

Instance Method Details

#+(other) ⇒ Object



53
54
55
# File 'railties/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 'railties/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