Class: RBI::MergeTree
- Inherits:
-
Tree
- Object
- Node
- NodeWithComments
- Tree
- RBI::MergeTree
- Extended by:
- T::Sig
- Defined in:
- lib/rbi/rewriters/merge_trees.rb
Overview
A tree that might contain conflicts
Instance Attribute Summary collapse
-
#conflicts ⇒ Object
readonly
Returns the value of attribute conflicts.
Attributes inherited from Tree
Attributes inherited from NodeWithComments
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(loc: nil, comments: [], conflicts: [], &block) ⇒ MergeTree
constructor
A new instance of MergeTree.
Methods inherited from Tree
#<<, #accept_printer, #add_sig_templates!, #annotate!, #deannotate!, #empty?, #group_nodes!, #index, #merge, #nest_non_public_methods!, #nest_singleton_methods!, #oneline?, #sort_nodes!
Methods inherited from NodeWithComments
#annotations, #merge_with, #oneline?
Methods inherited from Node
#accept_printer, #compatible_with?, #detach, #group_kind, #merge_with, #oneline?, #parent_conflict_tree, #parent_scope, #print, #print_blank_line_before, #replace, #string
Constructor Details
#initialize(loc: nil, comments: [], conflicts: [], &block) ⇒ MergeTree
Returns a new instance of MergeTree.
338 339 340 341 342 |
# File 'lib/rbi/rewriters/merge_trees.rb', line 338 def initialize(loc: nil, comments: [], conflicts: [], &block) super(loc: loc, comments: comments) @conflicts = conflicts block&.call(self) end |
Instance Attribute Details
#conflicts ⇒ Object (readonly)
Returns the value of attribute conflicts.
328 329 330 |
# File 'lib/rbi/rewriters/merge_trees.rb', line 328 def conflicts @conflicts end |