Sha256: f109f5286fe404845c09582ab89aaa94a72175fce9fc0eb2b8099c1e85293a4e
Contents?: true
Size: 504 Bytes
Versions: 5
Compression:
Stored size: 504 Bytes
Contents
class Ppl::Application::Router attr_accessor :aliases attr_accessor :default def initialize(command_suite) @command_suite = command_suite @aliases = {} end def route(argument) command = @command_suite.find_command(argument) if command.nil? && @aliases.has_key?(argument) command = @command_suite.find_command(@aliases[argument]) end if command.nil? && !@default.nil? command = @command_suite.find_command(@default) end return command end end
Version data entries
5 entries across 5 versions & 1 rubygems