Callback#merge merges options for a callback skip instead of a callback. Renamed it to indicate what it actually does.
This commit is contained in:
parent
b93b39eff6
commit
0928c3f294
@ -373,7 +373,7 @@ def initialize(name, filter, kind, options, chain_config)
|
||||
def filter; @key; end
|
||||
def raw_filter; @filter; end
|
||||
|
||||
def merge(chain, new_options)
|
||||
def merge_conditional_options(chain, new_options)
|
||||
options = {
|
||||
:if => @if.dup,
|
||||
:unless => @unless.dup
|
||||
@ -701,7 +701,7 @@ def skip_callback(name, *filter_list, &block)
|
||||
filter = chain.find {|c| c.matches?(type, filter) }
|
||||
|
||||
if filter && options.any?
|
||||
new_filter = filter.merge(chain, options)
|
||||
new_filter = filter.merge_conditional_options(chain, options)
|
||||
chain.insert(chain.index(filter), new_filter)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user