Class: RBI::ScopeConflict
- Inherits:
-
Tree
- Object
- Node
- NodeWithComments
- Tree
- RBI::ScopeConflict
- Extended by:
- T::Sig
- Defined in:
- lib/rbi/rewriters/merge_trees.rb
Overview
A conflict between two scope headers
Is rendered as a merge conflict between ‘left` and` right` for scope definitions: ~~~rb <<<<<<< left class Foo
module Foo >>>>>>> right
def m1; end
end ~~~
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#left_name ⇒ Object
readonly
Returns the value of attribute left_name.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
-
#right_name ⇒ Object
readonly
Returns the value of attribute right_name.
Attributes inherited from Tree
Attributes inherited from NodeWithComments
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(left:, right:, left_name: "left", right_name: "right") ⇒ ScopeConflict
constructor
A new instance of ScopeConflict.
Methods inherited from Tree
#<<, #add_sig_templates!, #annotate!, #deannotate!, #empty?, #filter_versions!, #flatten_singleton_methods!, #flatten_visibilities!, #group_nodes!, #index, #merge, #nest_non_public_members!, #nest_singleton_methods!, #nest_top_level_members!, #replace_attributes_with_methods!, #sort_nodes!
Methods inherited from NodeWithComments
#annotations, #merge_with, #version_requirements
Methods inherited from Node
#compatible_with?, #detach, #merge_with, #parent_conflict_tree, #parent_scope, #print, #rbs_print, #rbs_string, #replace, #satisfies_version?, #string
Constructor Details
#initialize(left:, right:, left_name: "left", right_name: "right") ⇒ ScopeConflict
Returns a new instance of ScopeConflict.
633 634 635 636 637 638 639 |
# File 'lib/rbi/rewriters/merge_trees.rb', line 633 def initialize(left:, right:, left_name: "left", right_name: "right") super() @left = left @right = right @left_name = left_name @right_name = right_name end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
620 621 622 |
# File 'lib/rbi/rewriters/merge_trees.rb', line 620 def left @left end |
#left_name ⇒ Object (readonly)
Returns the value of attribute left_name.
623 624 625 |
# File 'lib/rbi/rewriters/merge_trees.rb', line 623 def left_name @left_name end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
620 621 622 |
# File 'lib/rbi/rewriters/merge_trees.rb', line 620 def right @right end |
#right_name ⇒ Object (readonly)
Returns the value of attribute right_name.
623 624 625 |
# File 'lib/rbi/rewriters/merge_trees.rb', line 623 def right_name @right_name end |