class RBI::Module

Attributes

name[RW]

Public Class Methods

new(name, loc: nil, comments: [], &block) click to toggle source
Calls superclass method RBI::Tree::new
# File lib/rbi/model.rb, line 187
def initialize(name, loc: nil, comments: [], &block)
  super(loc: loc, comments: comments) {}
  @name = name
  block&.call(self)
end

Public Instance Methods

compatible_with?(other) click to toggle source
# File lib/rbi/rewriters/merge_trees.rb, line 357
def compatible_with?(other)
  other.is_a?(Module)
end
fully_qualified_name() click to toggle source
# File lib/rbi/model.rb, line 194
def fully_qualified_name
  return name if name.start_with?("::")
  "#{parent_scope&.fully_qualified_name}::#{name}"
end
print_header(v) click to toggle source