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)


137
138
139
# File 'core-docs/toys/flag.rb', line 137

def string
  @string
end

Instance Method Details

#countInteger

The number of matches that were found.

Returns:

  • (Integer)


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

Returns:

  • (Boolean)


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).

Returns:

  • (Boolean)


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.

Returns:

  • (Boolean)


159
160
161
# File 'core-docs/toys/flag.rb', line 159

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>)


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.

Returns:

  • (Boolean)


167
168
169
# File 'core-docs/toys/flag.rb', line 167

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:



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.

Returns:

  • (Boolean, nil)


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_syntaxToys::Flag::Syntax?

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

Returns:



193
194
195
# File 'core-docs/toys/flag.rb', line 193

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