From a68a450006b5b2b8c47234a6732752e8344b093f Mon Sep 17 00:00:00 2001 From: rkiel Date: Sat, 6 Jun 2015 07:08:59 -0400 Subject: [PATCH] consistency --- bin/feature | 8 ++++++-- lib/feature/commander.rb | 8 ++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/bin/feature b/bin/feature index 5b3daca..adb25db 100755 --- a/bin/feature +++ b/bin/feature @@ -2,5 +2,9 @@ require_relative '../lib/feature/commander' -command = Feature::Commander.new(ARGV) -command.execute +commander = Feature::Commander.new(ARGV) +if commander.valid? + commander.execute +else + commander.help +end diff --git a/lib/feature/commander.rb b/lib/feature/commander.rb index dc5d77f..89af5b1 100644 --- a/lib/feature/commander.rb +++ b/lib/feature/commander.rb @@ -13,6 +13,14 @@ module Feature @argv = argv end + def valid? + true + end + + def help + exit + end + def execute command = case argv[0] when "start" then Feature::Start.new(argv)