Class: Bashly::Models::Argument
- Defined in:
- lib/bashly/models/argument.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #method_missing, #respond_to?
Methods included from Renderable
Constructor Details
This class inherits a constructor from Bashly::Models::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Bashly::Models::Base
Instance Method Details
#optional ⇒ Object
4 5 6 |
# File 'lib/bashly/models/argument.rb', line 4 def optional !required end |
#summary ⇒ Object
12 13 14 15 |
# File 'lib/bashly/models/argument.rb', line 12 def summary return "" unless help help.split("\n").first end |
#usage_string ⇒ Object
8 9 10 |
# File 'lib/bashly/models/argument.rb', line 8 def usage_string required ? name.upcase : "[#{name.upcase}]" end |