Sha256: 8495359264a4e3c9657d51310e4ab8e769944fe0f7cbd781d9688addab71fe48

Contents?: true

Size: 338 Bytes

Versions: 20

Compression:

Stored size: 338 Bytes

Contents

class Ppl::Application::Router

  attr_accessor :default

  def initialize(command_suite)
    @command_suite = command_suite
  end

  def route(argument)
    command = @command_suite.find_command(argument)
    if command.nil? && !@default.nil?
      command = @command_suite.find_command(@default)
    end
    return command
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ppl-1.8.0 lib/ppl/application/router.rb
ppl-1.7.0 lib/ppl/application/router.rb
ppl-1.6.0 lib/ppl/application/router.rb
ppl-1.5.3 lib/ppl/application/router.rb
ppl-1.5.2 lib/ppl/application/router.rb
ppl-1.5.1 lib/ppl/application/router.rb
ppl-1.5.0 lib/ppl/application/router.rb
ppl-1.4.1 lib/ppl/application/router.rb
ppl-1.3.0 lib/ppl/application/router.rb
ppl-1.2.0 lib/ppl/application/router.rb
ppl-1.1.0 lib/ppl/application/router.rb
ppl-1.0.6 lib/ppl/application/router.rb
ppl-1.0.5 lib/ppl/application/router.rb
ppl-1.0.4 lib/ppl/application/router.rb
ppl-1.0.3 lib/ppl/application/router.rb
ppl-1.0.1 lib/ppl/application/router.rb
ppl-1.0.0 lib/ppl/application/router.rb
ppl-0.9.0 lib/ppl/application/router.rb
ppl-0.3.0 lib/ppl/application/router.rb
ppl-0.2.0 lib/ppl/application/router.rb