Query methods that allow categorizing strings based on their context for where they could be valid in a Ruby syntax tree.

Attributes
Read

The string that this query is wrapping.

Class Methods

Returns true if the string constitutes a valid constant name. Note that this means the names that can be set through Module#const_set, not necessarily the ones that can be set through a constant assignment.

Returns true if the string constitutes a valid local variable name. Note that this means the names that can be set through Binding#local_variable_set, not necessarily the ones that can be set through a local variable assignment.

Returns true if the string constitutes a valid method name.

Initialize a new query with the given string.

Instance Methods

Whether or not this string is a valid constant name.

Whether or not this string is a valid local variable name.

Whether or not this string is a valid method name.