Class: Toys::Flag::Resolution
- Inherits:
-
Object
- Object
- Toys::Flag::Resolution
- Defined in:
- core-docs/toys/flag.rb
Overview
Defined in the toys-core gem
The result of looking up a flag by name.
Instance Attribute Summary collapse
-
#string ⇒ String
readonly
The flag string that was looked up.
Instance Method Summary collapse
-
#count ⇒ Integer
The number of matches that were found.
-
#found_exact? ⇒ Boolean
Whether an exact match of the string was found.
-
#found_multiple? ⇒ Boolean
Whether multiple matches were found (i.e. ambiguous input).
-
#found_unique? ⇒ Boolean
Whether a single unique match was found.
-
#matching_flag_strings ⇒ Array<String>
Returns an array of the matching full flag strings.
-
#not_found? ⇒ Boolean
Whether no matches were found.
-
#unique_flag ⇒ Toys::Flag?
Return the unique Toys::Flag, or
nilif not found or not unique. -
#unique_flag_negative? ⇒ Boolean?
Return whether the unique match was a hit on the negative (
--no-*) case, ornilif not found or not unique. -
#unique_flag_syntax ⇒ Toys::Flag::Syntax?
Return the unique Syntax, or
nilif not found or not unique.
Instance Attribute Details
#string ⇒ String (readonly)
The flag string that was looked up
137 138 139 |
# File 'core-docs/toys/flag.rb', line 137 def string @string end |
Instance Method Details
#count ⇒ Integer
The number of matches that were found.
151 152 153 |
# File 'core-docs/toys/flag.rb', line 151 def count # Source available in the toys-core gem end |
#found_exact? ⇒ Boolean
Whether an exact match of the string was found
143 144 145 |
# File 'core-docs/toys/flag.rb', line 143 def found_exact? # Source available in the toys-core gem end |
#found_multiple? ⇒ Boolean
Whether multiple matches were found (i.e. ambiguous input).
175 176 177 |
# File 'core-docs/toys/flag.rb', line 175 def found_multiple? # Source available in the toys-core gem end |
#found_unique? ⇒ Boolean
Whether a single unique match was found.
159 160 161 |
# File 'core-docs/toys/flag.rb', line 159 def found_unique? # Source available in the toys-core gem end |
#matching_flag_strings ⇒ Array<String>
Returns an array of the matching full flag strings.
210 211 212 |
# File 'core-docs/toys/flag.rb', line 210 def matching_flag_strings # Source available in the toys-core gem end |
#not_found? ⇒ Boolean
Whether no matches were found.
167 168 169 |
# File 'core-docs/toys/flag.rb', line 167 def not_found? # Source available in the toys-core gem end |
#unique_flag ⇒ Toys::Flag?
Return the unique Toys::Flag, or nil if not found or
not unique.
184 185 186 |
# File 'core-docs/toys/flag.rb', line 184 def unique_flag # Source available in the toys-core gem end |
#unique_flag_negative? ⇒ Boolean?
Return whether the unique match was a hit on the negative (--no-*)
case, or nil if not found or not unique.
202 203 204 |
# File 'core-docs/toys/flag.rb', line 202 def unique_flag_negative? # Source available in the toys-core gem end |
#unique_flag_syntax ⇒ Toys::Flag::Syntax?
Return the unique Syntax, or nil if not found
or not unique.
193 194 195 |
# File 'core-docs/toys/flag.rb', line 193 def unique_flag_syntax # Source available in the toys-core gem end |