Class: Rails::Configuration::MiddlewareStackProxy

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

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initializeMiddlewareStackProxy

Returns a new instance of MiddlewareStackProxy.



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

def initialize
  @operations = []
end

Instance Method Details

#delete(*args, &block) ⇒ Object



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

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

#insert_after(*args, &block) ⇒ Object



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

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

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



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

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

#merge_into(other) ⇒ Object



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

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

#swap(*args, &block) ⇒ Object



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

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

#use(*args, &block) ⇒ Object



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

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