Class: Toys::Flag::Resolution

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#stringString (readonly)

The flag string that was looked up

Returns:

  • (String)


126
127
128
# File 'core-docs/toys/flag.rb', line 126

def string
  @string
end

Instance Method Details

#countInteger

The number of matches that were found.

Returns:

  • (Integer)


140
141
142
# File 'core-docs/toys/flag.rb', line 140

def count
  # Source available in the toys-core gem
end

#found_exact?Boolean

Whether an exact match of the string was found

Returns:

  • (Boolean)


132
133
134
# File 'core-docs/toys/flag.rb', line 132

def found_exact?
  # Source available in the toys-core gem
end

#found_multiple?Boolean

Whether multiple matches were found (i.e. ambiguous input).

Returns:

  • (Boolean)


164
165
166
# File 'core-docs/toys/flag.rb', line 164

def found_multiple?
  # Source available in the toys-core gem
end

#found_unique?Boolean

Whether a single unique match was found.

Returns:

  • (Boolean)


148
149
150
# File 'core-docs/toys/flag.rb', line 148

def found_unique?
  # Source available in the toys-core gem
end

#matching_flag_stringsArray<String>

Returns an array of the matching full flag strings.

Returns:

  • (Array<String>)


199
200
201
# File 'core-docs/toys/flag.rb', line 199

def matching_flag_strings
  # Source available in the toys-core gem
end

#not_found?Boolean

Whether no matches were found.

Returns:

  • (Boolean)


156
157
158
# File 'core-docs/toys/flag.rb', line 156

def not_found?
  # Source available in the toys-core gem
end

#unique_flagToys::Flag?

Return the unique Toys::Flag, or nil if not found or not unique.

Returns:



173
174
175
# File 'core-docs/toys/flag.rb', line 173

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.

Returns:

  • (Boolean, nil)


191
192
193
# File 'core-docs/toys/flag.rb', line 191

def unique_flag_negative?
  # Source available in the toys-core gem
end

#unique_flag_syntaxToys::Flag::Syntax?

Return the unique Syntax, or nil if not found or not unique.

Returns:



182
183
184
# File 'core-docs/toys/flag.rb', line 182

def unique_flag_syntax
  # Source available in the toys-core gem
end