Class: RBI::Rewriters::RemoveKnownDefinitions::Operation
- Inherits:
-
Object
- Object
- RBI::Rewriters::RemoveKnownDefinitions::Operation
- Defined in:
- lib/rbi/rewriters/remove_known_definitions.rb
Instance Attribute Summary collapse
-
#deleted_node ⇒ Object
readonly
: Node.
-
#duplicate_of ⇒ Object
readonly
: Node.
Instance Method Summary collapse
-
#initialize(deleted_node:, duplicate_of:) ⇒ Operation
constructor
: (deleted_node: Node, duplicate_of: Node) -> void.
-
#to_s ⇒ Object
: -> String.
Constructor Details
#initialize(deleted_node:, duplicate_of:) ⇒ Operation
: (deleted_node: Node, duplicate_of: Node) -> void
131 132 133 134 |
# File 'lib/rbi/rewriters/remove_known_definitions.rb', line 131 def initialize(deleted_node:, duplicate_of:) @deleted_node = deleted_node @duplicate_of = duplicate_of end |
Instance Attribute Details
#deleted_node ⇒ Object (readonly)
: Node
128 129 130 |
# File 'lib/rbi/rewriters/remove_known_definitions.rb', line 128 def deleted_node @deleted_node end |
#duplicate_of ⇒ Object (readonly)
: Node
128 129 130 |
# File 'lib/rbi/rewriters/remove_known_definitions.rb', line 128 def duplicate_of @duplicate_of end |
Instance Method Details
#to_s ⇒ Object
: -> String
137 138 139 |
# File 'lib/rbi/rewriters/remove_known_definitions.rb', line 137 def to_s "Deleted #{duplicate_of} at #{deleted_node.loc} (duplicate from #{duplicate_of.loc})" end |