CodeQL library for Ruby
codeql/ruby-all 0.8.15-dev (changelog, source)
Search

Member predicate StringlikeLiteral::getComponent

Gets the nth component of this string or string-like literal. The result will be one of StringTextComponent, StringInterpolationComponent, and StringEscapeSequenceComponent.

In the following example, the result for n = 0 is the StringTextComponent for foo_, and the result for n = 1 is the StringInterpolationComponent for Time.now.

"foo_#{ Time.now }"
StringComponent getComponent(int n)