Class: RBI::Include
- Inherits:
-
Mixin
- Object
- Node
- NodeWithComments
- Mixin
- RBI::Include
- Extended by:
- T::Sig
- Includes:
- Indexable
- Defined in:
- lib/rbi/index.rb,
lib/rbi/model.rb,
lib/rbi/rewriters/merge_trees.rb
Instance Attribute Summary
Attributes inherited from Mixin
Attributes inherited from NodeWithComments
Attributes inherited from Node
Instance Method Summary collapse
Methods inherited from Mixin
Methods inherited from NodeWithComments
#initialize, #merge_with, #oneline?
Methods inherited from Node
#accept_printer, #detach, #group_kind, #initialize, #merge_with, #oneline?, #parent_conflict_tree, #parent_scope, #print, #replace, #string
Constructor Details
This class inherits a constructor from RBI::Mixin
Instance Method Details
#compatible_with?(other) ⇒ Boolean
419 420 421 |
# File 'lib/rbi/rewriters/merge_trees.rb', line 419 def compatible_with?(other) other.is_a?(Include) && super end |
#index_ids ⇒ Object
122 123 124 |
# File 'lib/rbi/index.rb', line 122 def index_ids names.map { |name| "#{parent_scope&.fully_qualified_name}.include(#{name})" } end |
#to_s ⇒ Object
572 573 574 |
# File 'lib/rbi/model.rb', line 572 def to_s "#{parent_scope&.fully_qualified_name}.include(#{names.join(", ")})" end |