forked from ScraaapYard/havas
31 lines
530 B
Ruby
31 lines
530 B
Ruby
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}
|
|
|
|
|