forked from ScraaapYard/havas
37 lines
616 B
Ruby
37 lines
616 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 "-"
|
|
repl
|
|
when "--help"
|
|
puts help
|
|
else
|
|
puts help
|
|
|
|
end
|
|
|
|
end
|
|
|
|
# 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}
|
|
|
|
|
|
def repl()
|
|
while true do
|
|
puts ">>>>>>"
|
|
eval("puts 'hie'")
|
|
end
|
|
end
|