Class: RoCommands::Base

Inherits:
Thor
  • Object
show all
Includes:
Bash
Defined in:
lib/ro_commands/base.rb

Class Method Summary collapse

Methods included from Bash

#_bash, #bash, #bash_lines, #bash_per, #handle_path

Class Method Details

.describe(action, item, shortcut_item) ⇒ Object



44
45
46
# File 'lib/ro_commands/base.rb', line 44

def describe(action, item, shortcut_item)
  "#{action} #{item}"
end

.method_added(method) ⇒ Object



27
28
29
30
31
32
# File 'lib/ro_commands/base.rb', line 27

def method_added(method)
  super
  unless method.match(%r{drb_})
    meths << method
  end
end

.methsObject



34
35
36
37
38
# File 'lib/ro_commands/base.rb', line 34

def meths
  @meths.flatten! if @meths.respond_to?(:flatten!)
  @meths.uniq! if @meths.respond_to?(:uniq!)
  @meths ||= []
end

.usage(meth_name) ⇒ Object



40
41
42
# File 'lib/ro_commands/base.rb', line 40

def usage(meth_name)
  "#{name.split("::")[-1].uncamelize} #{meth_name}"
end