lib/haveapi/go_client/parameter.rb in haveapi-go-client-0.20.0 vs lib/haveapi/go_client/parameter.rb in haveapi-go-client-0.21.0
- old
+ new
@@ -1,7 +1,7 @@
module HaveAPI::GoClient
- module Parameters ; end
+ module Parameters; end
module Parameter
# @param klass [Class]
# @param block [Proc]
def self.register(klass, block)
@@ -14,11 +14,11 @@
# @param io [InputOutput]
# @param name [String]
# @param desc [Hash]
# @return [Parameters::Base, nil]
def self.new(role, direction, io, name, desc)
- klass, _ =
- @handlers.select do |klass, block|
+ klass, =
+ @handlers.select do |_klass, block|
block.call(role, direction, name, desc)
end.first
klass ? klass.new(io, name, desc) : nil
end