module Executable::Dispatch
Variation of Executable
which provides basic compatibility with previous versions of Executable
. It provides a call method that automatically dispatches to public methods.
Among other uses, Dispatch
can be useful for dropping into any class as a quick and dirty way to work with it on the command line.
@since 1.2.0
Public Class Methods
included(base)
click to toggle source
When Dispatchable is included into a class, the class is also extended by ‘Executable::Domain`.
# File lib/executable/dispatch.rb, line 18 def self.included(base) base.extend Domain end
Public Instance Methods
call(name, *args)
click to toggle source
# File lib/executable/dispatch.rb, line 22 def call(name, *args) public_method(name).call(*args) end