This commit is contained in:
Ms 2023-09-04 18:29:30 +05:30
parent 9f84821d1a
commit 8eb55b3531
1 changed files with 30 additions and 0 deletions

30
test.ruby Normal file
View File

@ -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}