Class: RBS::Inline::AST::Declarations::ModuleDecl

Inherits:
ModuleOrClass show all
Includes:
ConstantUtil
Defined in:
lib/rbs/inline/ast/declarations.rb

Overview

Prism::ModuleNode

Instance Attribute Summary

Attributes inherited from ModuleOrClass

#comments, #members, #node

Instance Method Summary collapse

Methods included from ConstantUtil

#type_name, #value_node

Methods inherited from ModuleOrClass

#initialize, #start_line, #type_params

Constructor Details

This class inherits a constructor from RBS::Inline::AST::Declarations::ModuleOrClass

Instance Method Details

#module_nameObject



156
157
158
# File 'lib/rbs/inline/ast/declarations.rb', line 156

def module_name #: TypeName?
  type_name(node.constant_path)
end

#module_selfsObject



161
162
163
164
165
166
167
168
169
170
171
# File 'lib/rbs/inline/ast/declarations.rb', line 161

def module_selfs #: Array[Annotations::ModuleSelf]
  if comments
    comments.each_annotation.filter_map do |ann|
      if ann.is_a?(AST::Annotations::ModuleSelf)
        ann
      end
    end
  else
    []
  end
end