Commits

bleything  committed b5abb44

* make the tests for @argument_type more explicit in the argument validator in SimpleCommand

  • Participants
  • Parent commits 56bdd43

Comments (0)

Files changed (1)

File lib/linen/simple_command.rb

 
 class Linen::Plugin::SimpleCommand
 	include Linen::Plugin::CommandInfrastructure
-
+	
 	attr_reader :name
 
 	#############################
 	def validate_arguments( args )
 		if @argument_type == :one_of
 			return validate_one_of_arguments( args.first )
-		else # @argument_type == :required
+		elsif @argument_type == :required
 			return validate_required_arguments( args )
+		else
+			# this is a Can't Happen(tm) so I'm comfortable with the crappy
+			# exception string.  :P
+			raise "Something has happened!"
 		end
-
-		# this is a Can't Happen(tm) so I'm comfortable with the crappy
-		# exception string.  :P
-		raise "Something has happened!"
 	end