forked from ScraaapYard/havas
add test
This commit is contained in:
parent
9f84821d1a
commit
8eb55b3531
|
@ -0,0 +1,30 @@
|
|||
has_flag = false
|
||||
cli_ARGS = ARGV
|
||||
|
||||
|
||||
def flag_exec(flag)
|
||||
help = "Usage: havas [filename]
|
||||
|
||||
--help show this help information
|
||||
--version output version information and exit
|
||||
"
|
||||
|
||||
case flag
|
||||
when "--version"
|
||||
puts "Havas version 0.0.1"
|
||||
when "-"
|
||||
|
||||
when "--help"
|
||||
puts help
|
||||
else
|
||||
puts help
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
#hey bro
|
||||
# checking for flags
|
||||
if cli_ARGS.length == 0 then flag_exec 0 end
|
||||
cli_ARGS.each{|flag| if flag[0]=='-' then flag_exec flag end}
|
||||
|
||||
|
Loading…
Reference in New Issue