Class: RBI::MixesInClassMethods
- Inherits:
-
Mixin
show all
- 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
#names
#comments
Attributes inherited from Node
#loc, #parent_tree
Instance Method Summary
collapse
Methods inherited from Mixin
#accept_printer
#merge_with, #oneline?
Methods inherited from Node
#accept_printer, #detach, #group_kind, #merge_with, #oneline?, #parent_conflict_tree, #parent_scope, #print, #replace, #string
Constructor Details
#initialize(name, *names, loc: nil, comments: [], &block) ⇒ MixesInClassMethods
1241
1242
1243
1244
|
# File 'lib/rbi/model.rb', line 1241
def initialize(name, *names, loc: nil, comments: [], &block)
super(name, names, loc: loc, comments: )
block&.call(self)
end
|
Instance Method Details
#compatible_with?(other) ⇒ Boolean
477
478
479
|
# File 'lib/rbi/rewriters/merge_trees.rb', line 477
def compatible_with?(other)
other.is_a?(MixesInClassMethods) && super
end
|
#index_ids ⇒ Object
142
143
144
|
# File 'lib/rbi/index.rb', line 142
def index_ids
names.map { |name| "#{parent_scope&.fully_qualified_name}.mixes_in_class_method(#{name})" }
end
|
#to_s ⇒ Object
1247
1248
1249
|
# File 'lib/rbi/model.rb', line 1247
def to_s
"#{parent_scope&.fully_qualified_name}.mixes_in_class_methods(#{names.join(", ")})"
end
|