class Prism::MagicComment
This represents a magic comment that was encountered during parsing.
Attributes
A Location object representing the location of the key in the source.
A Location object representing the location of the value in the source.
Public Class Methods
Public Instance Methods
() → String
Source
# File lib/prism/parse_result.rb, line 794 def key key_loc.slice end
Returns the key of the magic comment by slicing it from the source code.
() → String
Source
# File lib/prism/parse_result.rb, line 801 def value value_loc.slice end
Returns the value of the magic comment by slicing it from the source code.