Module: Luban::CLI::Commands::InstanceMethods
Instance Method Summary
collapse
#has_command?, #has_commands?, #list_commands
Instance Method Details
#command(cmd, **opts, &blk) ⇒ Object
66
67
68
69
70
71
72
73
|
# File 'lib/luban/cli/commands.rb', line 66
def command(cmd, **opts, &blk)
if self.is_a?(Command)
opts[:command_chain] = self.command_chain.clone.push(cmd)
self.class.command(self.app, cmd, **opts, &blk)
else
self.class.command(cmd, **opts, &blk)
end
end
|
#commands ⇒ Object
62
63
64
|
# File 'lib/luban/cli/commands.rb', line 62
def commands
self.class.commands
end
|
#undef_command(cmd) ⇒ Object
75
76
77
|
# File 'lib/luban/cli/commands.rb', line 75
def undef_command(cmd)
self.class.undef_command(cmd)
end
|