Occasionally it’s helpful to treat a string as if it were interpolated so that there’s a consistent interface for working with strings.
Occasionally it’s helpful to treat a string as if it were interpolated so that there’s a consistent interface for working with strings.
Replace the value of offsets with the given value.
Return the byte offset of the start of the line corresponding to the given byte offset.
The byte offset from the beginning of the source where this location ends.
The line number where this location starts.
The column number in bytes where this location starts from the start of the line.
Implement the hash pattern matching interface for Location
.
Implement the hash pattern matching interface for Comment
.
Implement the hash pattern matching interface for MagicComment
.
Implement the hash pattern matching interface for ParseError
.
Implement the hash pattern matching interface for ParseWarning
.
Implement the hash pattern matching interface for Result
.
Implement the hash pattern matching interface for ParseResult
.
Walk the tree and mark nodes that are on a new line, loosely emulating the behavior of CRuby’s :line
tracepoint event.
Implement the hash pattern matching interface for LexResult
.
Implement the hash pattern matching interface for ParseLexResult
.
Implement the hash pattern matching interface for Token
.
Raise an error because the given node is not supported.
Returns the full path to the base gem directory.
eg: /usr/local/lib/ruby/gems/1.8
Full path of the target library file. If the file is not in this gem, return nil.
Paths in the gem to add to $LOAD_PATH
when this gem is activated.
See also require_paths=
If you have an extension you do not need to add "ext"
to the require path, the extension build process will copy the extension files into “lib” for you.
The default value is "lib"
Usage:
# If all library files are in the root directory... spec.require_path = '.'
Returns the paths to the source files for use with analysis and documentation tools. These paths are relative to full_gem_path.
Arguments used when building gems