Class: SimpleCov::Formatter::AIFormatter::ASTResolver::SemanticNode

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/simplecov-ai/ast_resolver.rb

Overview

An immutable struct housing bounds, identification metrics, and static bypassing definitions derived from traversing the AST nodes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, type:, start_line:, end_line:, bypasses: []) ⇒ SemanticNode

Returns a new instance of SemanticNode.



39
40
41
42
43
44
45
# File 'lib/simplecov-ai/ast_resolver.rb', line 39

def initialize(name:, type:, start_line:, end_line:, bypasses: [])
  @name = name
  @type = type
  @start_line = start_line
  @end_line = end_line
  @bypasses = bypasses
end

Instance Attribute Details

#bypassesObject (readonly)

Returns the value of attribute bypasses.



28
29
30
# File 'lib/simplecov-ai/ast_resolver.rb', line 28

def bypasses
  @bypasses
end

#end_lineObject (readonly)

Returns the value of attribute end_line.



25
26
27
# File 'lib/simplecov-ai/ast_resolver.rb', line 25

def end_line
  @end_line
end

#nameObject (readonly)

Returns the value of attribute name.



22
23
24
# File 'lib/simplecov-ai/ast_resolver.rb', line 22

def name
  @name
end

#start_lineObject (readonly)

Returns the value of attribute start_line.



25
26
27
# File 'lib/simplecov-ai/ast_resolver.rb', line 25

def start_line
  @start_line
end

#typeObject (readonly)

Returns the value of attribute type.



22
23
24
# File 'lib/simplecov-ai/ast_resolver.rb', line 22

def type
  @type
end