Here we are going to patch StringQuery to put in the class-level methods so that it can maintain a consistent interface

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

Mirrors the C extension’s StringQuery::constant? method.

Mirrors the C extension’s StringQuery::local? method.

Mirrors the C extension’s StringQuery::method_name? method.

Initialize a new query with the given string.

Parse the enum result and return an appropriate boolean.

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.