class UnitHosting::CLI

Attributes

commands[RW]

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/unit-hosting/cli.rb, line 7
def initialize
  super
  @commands = Commands.new
end

Public Instance Methods

dispatch(cmd,cmd_argv) click to toggle source
# File lib/unit-hosting/cli.rb, line 17
def dispatch(cmd,cmd_argv)
  @commands.send(cmd.sub(/:/,"_"))
end
version() click to toggle source
# File lib/unit-hosting/cli.rb, line 11
def version
  File.open(File.join(File.dirname(__FILE__) ,
                      "..","..","VERSION"),"r") { |file|
    puts file.gets
  }
end