Module: DuckTest::Usage
- Included in:
- Commands
- Defined in:
- lib/duck_test/usage.rb
Overview
Provides usage details for all of the console commands.
Instance Method Summary (collapse)
-
- (Boolean) usage(key, show = false)
Returns the value of show.
Instance Method Details
- (Boolean) usage(key, show = false)
Note:
future version will pull usage info using i18n
Returns the value of show
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/duck_test/usage.rb', line 12 def usage(key, show = false) if show content = YAML.load_file(File.(__FILE__).gsub(".rb", ".yml")) case key when :usage puts "DuckTest #{VERSION}" puts content[:usage] else if content[key] puts content[key] else puts "help not found for command: #{key}" end end end return show end |