Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Pass arguments as a hash
Browse files Browse the repository at this point in the history
  • Loading branch information
kodnin committed Aug 10, 2021
1 parent 931df97 commit a786851
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/image_vise/pipeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ def empty?
@ops.empty?
end

def method_missing(method_name, *a, &blk)
def method_missing(method_name, args = {}, &blk)
operator_builder = ImageVise.operator_from(method_name)
self << operator_builder.new(*a)
self << operator_builder.new(**args)
end

def respond_to_missing?(method_name, *a)
ImageVise.defined_operators.include?(method_name.to_s)
end
Expand Down

0 comments on commit a786851

Please sign in to comment.