Module: Luban::CLI::Commands::CommonMethods

Included in:
ClassMethods, InstanceMethods
Defined in:
lib/luban/cli/commands.rb

Instance Method Summary collapse

Instance Method Details

#has_command?(cmd) ⇒ Boolean

Returns:



14
15
16
# File 'lib/luban/cli/commands.rb', line 14

def has_command?(cmd)
  commands.has_key?(cmd)
end

#has_commands?Boolean

Returns:



18
19
20
# File 'lib/luban/cli/commands.rb', line 18

def has_commands?
  !commands.empty?
end

#list_commandsObject



10
11
12
# File 'lib/luban/cli/commands.rb', line 10

def list_commands
  commands.keys
end