Module: Runbook::Generators::Base::ClassMethods
- Defined in:
- lib/runbook/generators/base.rb
Instance Method Summary collapse
- #command ⇒ Object
- #description ⇒ Object
- #long_description ⇒ Object
- #options ⇒ Object
- #usage ⇒ Object
Instance Method Details
#command ⇒ Object
22 23 24 |
# File 'lib/runbook/generators/base.rb', line 22 def command self.to_s.gsub("Runbook::Generators::", "").underscore end |
#description ⇒ Object
32 33 34 |
# File 'lib/runbook/generators/base.rb', line 32 def description "Generate a #{command}" end |
#long_description ⇒ Object
36 37 38 |
# File 'lib/runbook/generators/base.rb', line 36 def long_description description end |
#options ⇒ Object
40 41 42 |
# File 'lib/runbook/generators/base.rb', line 40 def {} end |
#usage ⇒ Object
26 27 28 29 30 |
# File 'lib/runbook/generators/base.rb', line 26 def usage args = arguments.map(&:banner).join(" ") args += " " unless args.empty? "#{command} #{args}[options]" end |