lib/clamp/parameter/parsing.rb in clamp-0.1.0 vs lib/clamp/parameter/parsing.rb in clamp-0.1.1

- old
+ new

@@ -5,21 +5,19 @@ protected def parse_parameters - return false if self.class.parameters.empty? - self.class.parameters.each do |parameter| begin - value = parameter.consume(arguments) + value = parameter.consume(remaining_arguments) send("#{parameter.attribute_name}=", value) rescue ArgumentError => e signal_usage_error "parameter '#{parameter.name}': #{e.message}" end end - unless arguments.empty? + unless remaining_arguments.empty? signal_usage_error "too many arguments" end end