Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/image_processing/chainable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,12 @@ def invalid_operation?(name)

# Assume that any unknown method names an operation supported by the
# processor. Add a bang ("!") if you want processing to be performed.
def method_missing(name, *args, &block)
def method_missing(name, ...)
return super if name.to_s.end_with?("?")
return public_send(name.to_s.chomp("!"), *args, &block).call if name.to_s.end_with?("!")
return public_send(name.to_s.chomp("!"), ...).call if name.to_s.end_with?("!")

operation(name, *args, &block)
operation(name, ...)
end
ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true)

# Empty options which the builder starts with.
DEFAULT_OPTIONS = {
Expand Down
Loading