Class: Deface::Environment::Overrides
- Inherits:
-
Object
- Object
- Deface::Environment::Overrides
- Defined in:
- lib/deface/environment.rb
Instance Attribute Summary collapse
-
#all ⇒ Object
Returns the value of attribute all.
Instance Method Summary collapse
- #early_check ⇒ Object
- #find(*args) ⇒ Object
-
#initialize ⇒ Overrides
constructor
A new instance of Overrides.
- #load_all(app) ⇒ Object
Constructor Details
#initialize ⇒ Overrides
Returns a new instance of Overrides.
46 47 48 |
# File 'lib/deface/environment.rb', line 46 def initialize @all = {} end |
Instance Attribute Details
#all ⇒ Object
Returns the value of attribute all.
44 45 46 |
# File 'lib/deface/environment.rb', line 44 def all @all end |
Instance Method Details
#early_check ⇒ Object
66 67 68 69 70 71 72 |
# File 'lib/deface/environment.rb', line 66 def early_check Deface::Override._early.each do |args| Deface::Override.new(args) end Deface::Override._early.clear end |
#find(*args) ⇒ Object
50 51 52 |
# File 'lib/deface/environment.rb', line 50 def find(*args) Deface::Override.find(*args) end |
#load_all(app) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/deface/environment.rb', line 54 def load_all(app) # clear overrides before reloading them app.config.deface.overrides.all.clear Deface::DSL::Loader.register # check all railties / engines / extensions / application for overrides app.railties._all.dup.push(app).each do |railtie| next unless railtie.respond_to? :root load_overrides(railtie) end end |