class ASTDistance::Node

Attributes

index[R]
parent_index[RW]
type[R]

Public Class Methods

new(index:, type:) click to toggle source
# File lib/ast_distance/node.rb, line 6
def initialize(index:, type:)
  @index = index
  @type = type
  @parent_index = nil
end

Public Instance Methods

root_node?() click to toggle source
# File lib/ast_distance/node.rb, line 12
def root_node?
  parent_index.nil?
end