Class: RVC::CmdModule
- Inherits:
-
Object
- Object
- RVC::CmdModule
- Defined in:
- lib/rvc/modules.rb
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
Constructor Details
#initialize(module_name) ⇒ CmdModule
Returns a new instance of CmdModule.
27 28 29 30 31 |
# File 'lib/rvc/modules.rb', line 27 def initialize module_name @module_name = module_name @opts = {} super() end |
Instance Method Details
#commands ⇒ Object
33 34 35 |
# File 'lib/rvc/modules.rb', line 33 def commands @opts.keys end |
#opts(cmd, &b) ⇒ Object
37 38 39 |
# File 'lib/rvc/modules.rb', line 37 def opts cmd, &b @opts[cmd] = b end |
#opts_for(cmd) ⇒ Object
41 42 43 |
# File 'lib/rvc/modules.rb', line 41 def opts_for cmd @opts[cmd] end |