class YARP::ParseResult::Comments::LocationTarget
A target for attaching comments that is based on a location field on a node. For example, the ‘end` token of a ClassNode
.
Attributes
location[R]
Public Class Methods
new(location)
click to toggle source
# File yarp/parse_result/comments.rb, line 52 def initialize(location) @location = location end
Public Instance Methods
<<(comment)
click to toggle source
# File yarp/parse_result/comments.rb, line 68 def <<(comment) location.comments << comment end
encloses?(comment)
click to toggle source
# File yarp/parse_result/comments.rb, line 64 def encloses?(comment) false end
end_offset()
click to toggle source
# File yarp/parse_result/comments.rb, line 60 def end_offset location.end_offset end
start_offset()
click to toggle source
# File yarp/parse_result/comments.rb, line 56 def start_offset location.start_offset end