Class: Prism::ParseResult::Comments::LocationTarget
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/prism/parse_result/comments.rb |
Overview
A target for attaching comments that is based on a location field on a node. For example, the end
token of a ClassNode.
Class Method Summary
- .new(location) ⇒ LocationTarget constructor
Instance Attribute Summary
- #location readonly
Instance Method Summary
Constructor Details
.new(location) ⇒ LocationTarget
Instance Attribute Details
#location (readonly)
[ GitHub ]# File 'lib/prism/parse_result/comments.rb', line 50
attr_reader :location
Instance Method Details
#<<(comment)
[ GitHub ]
#encloses?(comment) ⇒ Boolean
# File 'lib/prism/parse_result/comments.rb', line 64
def encloses?(comment) false end
#end_offset
[ GitHub ]# File 'lib/prism/parse_result/comments.rb', line 60
def end_offset location.end_offset end
#start_offset
[ GitHub ]# File 'lib/prism/parse_result/comments.rb', line 56
def start_offset location.start_offset end