Class: SimpleCov::Formatter::AIFormatter::ASTResolver::SemanticNode
- Inherits:
-
Object
- Object
- SimpleCov::Formatter::AIFormatter::ASTResolver::SemanticNode
- 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
-
#bypasses ⇒ Object
readonly
Returns the value of attribute bypasses.
-
#end_line ⇒ Object
readonly
Returns the value of attribute end_line.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#start_line ⇒ Object
readonly
Returns the value of attribute start_line.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name:, type:, start_line:, end_line:, bypasses: []) ⇒ SemanticNode
constructor
A new instance of SemanticNode.
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
#bypasses ⇒ Object (readonly)
Returns the value of attribute bypasses.
28 29 30 |
# File 'lib/simplecov-ai/ast_resolver.rb', line 28 def bypasses @bypasses end |
#end_line ⇒ Object (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 |
#name ⇒ Object (readonly)
Returns the value of attribute name.
22 23 24 |
# File 'lib/simplecov-ai/ast_resolver.rb', line 22 def name @name end |
#start_line ⇒ Object (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 |
#type ⇒ Object (readonly)
Returns the value of attribute type.
22 23 24 |
# File 'lib/simplecov-ai/ast_resolver.rb', line 22 def type @type end |