Module: Boson::Namespacer

Included in:
Boson
Defined in:
lib/boson/namespacer.rb

Instance Method Summary collapse

Instance Method Details

#full_invoke(cmd, args) ⇒ Object

Invoke command string even with namespaces



13
14
15
16
17
# File 'lib/boson/namespacer.rb', line 13

def full_invoke(cmd, args) #:nodoc:
  command, subcommand = cmd.include?(NAMESPACE) ? cmd.split(NAMESPACE, 2) : [cmd, nil]
  dispatcher = subcommand ? Boson.invoke(command) : Boson.main_object
  dispatcher.send(subcommand || command, *args)
end