Skip to content

Instantly share code, notes, and snippets.

@nuke99
Created May 1, 2012 15:08
Show Gist options
  • Save nuke99/2568650 to your computer and use it in GitHub Desktop.
Save nuke99/2568650 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'readline'
class Commands
def banner
puts 'This is a banner.'
end
def loka
puts "I just said loka"
end
end
class Front < Commands
def initialize
while cmd = Readline.readline("> ", true)
method, command = cmd.split
if self.respond_to?(method)
puts "#{method} is vaild"
self.send(method)
else
puts "[*] Unknown Mehotd"
end
end
end
end
font = Front.new()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment