Class: Yoda::AST::CommentBlock::TextPart
- Inherits:
-
BasePart
- Object
- BasePart
- Yoda::AST::CommentBlock::TextPart
show all
- Defined in:
- lib/yoda/ast/comment_block/text_part.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
#begin_location, #end_location, #include?, #range, #text
Constructor Details
#initialize(comment_block:, token:) ⇒ TextPart
Returns a new instance of TextPart.
13
14
15
16
|
# File 'lib/yoda/ast/comment_block/text_part.rb', line 13
def initialize(comment_block:, token:)
@comment_block =
@token = token
end
|
Instance Attribute Details
6
7
8
|
# File 'lib/yoda/ast/comment_block/text_part.rb', line 6
def
@comment_block
end
|
9
10
11
|
# File 'lib/yoda/ast/comment_block/text_part.rb', line 9
def token
@token
end
|
Instance Method Details
#begin_index ⇒ Object
18
19
20
|
# File 'lib/yoda/ast/comment_block/text_part.rb', line 18
def begin_index
token.content.offset
end
|
#end_index ⇒ Object
22
23
24
|
# File 'lib/yoda/ast/comment_block/text_part.rb', line 22
def end_index
token.content.offset + token.content.length
end
|