Class: Rails::Configuration::MiddlewareStackProxy

Inherits:
Object
  • Object
show all
Defined in:
railties/lib/rails/configuration.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initializeMiddlewareStackProxy

Returns a new instance of MiddlewareStackProxy.



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

def initialize
  @operations = []
end

Instance Method Details

#delete(*args, &block) ⇒ Object



32
33
34
# File 'railties/lib/rails/configuration.rb', line 32

def delete(*args, &block)
  @operations << [:delete, args, block]
end

#insert_after(*args, &block) ⇒ Object



20
21
22
# File 'railties/lib/rails/configuration.rb', line 20

def insert_after(*args, &block)
  @operations << [:insert_after, args, block]
end

#insert_before(*args, &block) ⇒ Object Also known as: insert



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

def insert_before(*args, &block)
  @operations << [:insert_before, args, block]
end

#merge_into(other) ⇒ Object



36
37
38
39
40
41
# File 'railties/lib/rails/configuration.rb', line 36

def merge_into(other)
  @operations.each do |operation, args, block|
    other.send(operation, *args, &block)
  end
  other
end

#swap(*args, &block) ⇒ Object



24
25
26
# File 'railties/lib/rails/configuration.rb', line 24

def swap(*args, &block)
  @operations << [:swap, args, block]
end

#use(*args, &block) ⇒ Object



28
29
30
# File 'railties/lib/rails/configuration.rb', line 28

def use(*args, &block)
  @operations << [:use, args, block]
end