class RBI::Include

Public Class Methods

new(name, *names, loc: nil, comments: [], &block) click to toggle source
Calls superclass method RBI::Mixin::new
# File lib/rbi/model.rb, line 784
def initialize(name, *names, loc: nil, comments: [], &block)
  super(name, names, loc: loc, comments: comments)
  block&.call(self)
end

Public Instance Methods

compatible_with?(other) click to toggle source
Calls superclass method RBI::Mixin#compatible_with?
# File lib/rbi/rewriters/merge_trees.rb, line 461
def compatible_with?(other)
  other.is_a?(Include) && super
end
index_ids() click to toggle source
# File lib/rbi/index.rb, line 122
def index_ids
  names.map { |name| "#{parent_scope&.fully_qualified_name}.include(#{name})" }
end
to_s() click to toggle source
# File lib/rbi/model.rb, line 790
def to_s
  "#{parent_scope&.fully_qualified_name}.include(#{names.join(", ")})"
end