Class: RVC::CmdModule
Constant Summary
Constants included from Util
Util::PROGRESS_BAR_LEFT, Util::PROGRESS_BAR_MIDDLE, Util::PROGRESS_BAR_RIGHT, Util::UserError
Instance Method Summary collapse
- #commands ⇒ Object
-
#initialize(module_name) ⇒ CmdModule
constructor
A new instance of CmdModule.
- #opts(cmd, &b) ⇒ Object
- #opts_for(cmd) ⇒ Object
- #rvc_alias(cmd, target = nil) ⇒ Object
Methods included from Util
#collect_children, #display_inventory, #err, #interactive?, #lookup, #lookup!, #lookup_single, #lookup_single!, #menu, #progress, #search_path, #single_connection, #system_fg, #tasks, #tcsetpgrp, #terminal_columns
Constructor Details
#initialize(module_name) ⇒ CmdModule
Returns a new instance of CmdModule.
31 32 33 34 35 |
# File 'lib/rvc/modules.rb', line 31 def initialize module_name @module_name = module_name @opts = {} super() end |
Instance Method Details
#commands ⇒ Object
37 38 39 |
# File 'lib/rvc/modules.rb', line 37 def commands @opts.keys end |
#opts(cmd, &b) ⇒ Object
41 42 43 |
# File 'lib/rvc/modules.rb', line 41 def opts cmd, &b @opts[cmd] = b end |
#opts_for(cmd) ⇒ Object
45 46 47 |
# File 'lib/rvc/modules.rb', line 45 def opts_for cmd @opts[cmd] end |