Exception: Ast::Merge::FreezeNodeBase::InvalidStructureError
- Inherits:
-
StandardError
- Object
- StandardError
- Ast::Merge::FreezeNodeBase::InvalidStructureError
- Defined in:
- lib/ast/merge/freeze_node_base.rb
Overview
Error raised when a freeze block has invalid structure
Instance Attribute Summary collapse
-
#end_line ⇒ Integer?
readonly
Ending line of the freeze block.
-
#start_line ⇒ Integer?
readonly
Starting line of the freeze block.
-
#unclosed_nodes ⇒ Array
readonly
Nodes that caused the structure error (optional).
Instance Method Summary collapse
-
#initialize(message, start_line: nil, end_line: nil, unclosed_nodes: []) ⇒ InvalidStructureError
constructor
A new instance of InvalidStructureError.
Constructor Details
#initialize(message, start_line: nil, end_line: nil, unclosed_nodes: []) ⇒ InvalidStructureError
Returns a new instance of InvalidStructureError.
79 80 81 82 83 84 |
# File 'lib/ast/merge/freeze_node_base.rb', line 79 def initialize(, start_line: nil, end_line: nil, unclosed_nodes: []) super() @start_line = start_line @end_line = end_line @unclosed_nodes = unclosed_nodes end |
Instance Attribute Details
#end_line ⇒ Integer? (readonly)
Returns Ending line of the freeze block.
70 71 72 |
# File 'lib/ast/merge/freeze_node_base.rb', line 70 def end_line @end_line end |
#start_line ⇒ Integer? (readonly)
Returns Starting line of the freeze block.
67 68 69 |
# File 'lib/ast/merge/freeze_node_base.rb', line 67 def start_line @start_line end |
#unclosed_nodes ⇒ Array (readonly)
Returns Nodes that caused the structure error (optional).
73 74 75 |
# File 'lib/ast/merge/freeze_node_base.rb', line 73 def unclosed_nodes @unclosed_nodes end |