Module: Registrable::ClassMethods
- Defined in:
- lib/rviki/registrable.rb
Instance Method Summary collapse
- #api_version(version = nil) ⇒ Object
- #binary_name(name = nil) ⇒ Object
- #examples(ex = nil) ⇒ Object
- #register_command(command_sym, args) ⇒ Object
- #registered_commands ⇒ Object
Instance Method Details
#api_version(version = nil) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/rviki/registrable.rb', line 17 def api_version(version=nil) if version.is_a?(String) @api_version = version end @api_version end |
#binary_name(name = nil) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/rviki/registrable.rb', line 24 def binary_name(name=nil) if name.is_a?(String) @binary_name = name end @binary_name end |
#examples(ex = nil) ⇒ Object
31 32 33 34 35 36 |
# File 'lib/rviki/registrable.rb', line 31 def examples(ex=nil) if ex.is_a?(String) @examples = ex end @examples end |
#register_command(command_sym, args) ⇒ Object
9 10 11 |
# File 'lib/rviki/registrable.rb', line 9 def register_command(command_sym, args) registered_commands[command_sym] = args end |
#registered_commands ⇒ Object
13 14 15 |
# File 'lib/rviki/registrable.rb', line 13 def registered_commands @registered_commands ||= {} end |