lib/clamp/parameter/parsing.rb in clamp-1.2.1 vs lib/clamp/parameter/parsing.rb in clamp-1.3.0
- old
+ new
@@ -1,8 +1,12 @@
+# frozen_string_literal: true
+
module Clamp
module Parameter
+ # Parameter parsing methods.
+ #
module Parsing
protected
def parse_parameters
@@ -17,10 +21,10 @@
begin
parameter.consume(remaining_arguments).each do |value|
parameter.of(self).take(value)
end
rescue ArgumentError => e
- signal_usage_error Clamp.message(:parameter_argument_error, :param => parameter.name, :message => e.message)
+ signal_usage_error Clamp.message(:parameter_argument_error, param: parameter.name, message: e.message)
end
end
end
def default_parameters_from_environment