Method: ElchScan::Application::Dispatch#dispatch
- Defined in:
- lib/elch_scan/application/dispatch.rb
#dispatch(action = (@opts[:dispatch] || :help)) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/elch_scan/application/dispatch.rb', line 4 def dispatch action = (@opts[:dispatch] || :help) case action when :help then @optparse.to_s.split("\n").each(&method(:log)) when :version, :info then dispatch_info else if respond_to?("dispatch_#{action}") send("dispatch_#{action}") else abort("unknown action #{action}", 1) end end end |