Class: Rails::Engine::Railties

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
railties/lib/rails/engine/railties.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Enumerable

#as_json, #compact_blank, #exclude?, #excluding, #including, #index_by, #index_with, #many?, #pluck, #sum, #without

Constructor Details

#initializeRailties

Returns a new instance of Railties.



9
10
11
12
# File 'railties/lib/rails/engine/railties.rb', line 9

def initialize
  @_all ||= ::Rails::Railtie.subclasses.map(&:instance) +
    ::Rails::Engine.subclasses.map(&:instance)
end

Instance Attribute Details

#_allObject (readonly)

Returns the value of attribute _all



7
8
9
# File 'railties/lib/rails/engine/railties.rb', line 7

def _all
  @_all
end

Instance Method Details

#-(others) ⇒ Object



18
19
20
# File 'railties/lib/rails/engine/railties.rb', line 18

def -(others)
  _all - others
end

#each(*args, &block) ⇒ Object



14
15
16
# File 'railties/lib/rails/engine/railties.rb', line 14

def each(*args, &block)
  _all.each(*args, &block)
end