Class: ArgvParser::UnnamedOption
- Inherits:
-
Object
- Object
- ArgvParser::UnnamedOption
- Defined in:
- lib/ruby-process-controller/argv_parser.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#conditions ⇒ Object
Returns the value of attribute conditions.
-
#option_is_boolean ⇒ Object
Returns the value of attribute option_is_boolean.
-
#option_name ⇒ Object
Returns the value of attribute option_name.
-
#short_option_name ⇒ Object
Returns the value of attribute short_option_name.
-
#value_is_optional ⇒ Object
Returns the value of attribute value_is_optional.
-
#value_may_be_array ⇒ Object
Returns the value of attribute value_may_be_array.
-
#value_name ⇒ Object
Returns the value of attribute value_name.
Instance Method Summary collapse
- #columnized_display ⇒ Object
- #display ⇒ Object
-
#initialize(option_name, value_is_optional, value_may_be_array, comment, conditions, block) ⇒ UnnamedOption
constructor
A new instance of UnnamedOption.
Constructor Details
#initialize(option_name, value_is_optional, value_may_be_array, comment, conditions, block) ⇒ UnnamedOption
Returns a new instance of UnnamedOption.
22 23 24 25 26 27 28 29 |
# File 'lib/ruby-process-controller/argv_parser.rb', line 22 def initialize option_name, value_is_optional, value_may_be_array, comment, conditions, block @option_name = option_name @value_is_optional = value_is_optional @value_may_be_array = value_may_be_array @comment = comment @conditions = conditions @block = block end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
31 32 33 |
# File 'lib/ruby-process-controller/argv_parser.rb', line 31 def block @block end |
#comment ⇒ Object
Returns the value of attribute comment.
31 32 33 |
# File 'lib/ruby-process-controller/argv_parser.rb', line 31 def comment @comment end |
#conditions ⇒ Object
Returns the value of attribute conditions.
31 32 33 |
# File 'lib/ruby-process-controller/argv_parser.rb', line 31 def conditions @conditions end |
#option_is_boolean ⇒ Object
Returns the value of attribute option_is_boolean.
32 33 34 |
# File 'lib/ruby-process-controller/argv_parser.rb', line 32 def option_is_boolean @option_is_boolean end |
#option_name ⇒ Object
Returns the value of attribute option_name.
31 32 33 |
# File 'lib/ruby-process-controller/argv_parser.rb', line 31 def option_name @option_name end |
#short_option_name ⇒ Object
Returns the value of attribute short_option_name.
32 33 34 |
# File 'lib/ruby-process-controller/argv_parser.rb', line 32 def short_option_name @short_option_name end |
#value_is_optional ⇒ Object
Returns the value of attribute value_is_optional.
31 32 33 |
# File 'lib/ruby-process-controller/argv_parser.rb', line 31 def value_is_optional @value_is_optional end |
#value_may_be_array ⇒ Object
Returns the value of attribute value_may_be_array.
31 32 33 |
# File 'lib/ruby-process-controller/argv_parser.rb', line 31 def value_may_be_array @value_may_be_array end |
#value_name ⇒ Object
Returns the value of attribute value_name.
32 33 34 |
# File 'lib/ruby-process-controller/argv_parser.rb', line 32 def value_name @value_name end |
Instance Method Details
#columnized_display ⇒ Object
38 39 40 |
# File 'lib/ruby-process-controller/argv_parser.rb', line 38 def columnized_display [display, comment] end |
#display ⇒ Object
34 35 36 |
# File 'lib/ruby-process-controller/argv_parser.rb', line 34 def display "#{"[" if value_is_optional}#{option_name}#{"]" if value_is_optional}#{"..." if value_may_be_array}" end |