Class: Decode::RBS::Wrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/decode/rbs/wrapper.rb

Overview

Base wrapper class for RBS generation from definitions.

Direct Known Subclasses

Class, Method, Module

Instance Method Summary collapse

Constructor Details

#initialize(definition) ⇒ Wrapper

Initialize the wrapper instance variables.



14
15
16
17
18
# File 'lib/decode/rbs/wrapper.rb', line 14

def initialize(definition)
  @definition = definition
  @tags = nil
  @comment = nil
end

Instance Method Details

#commentObject

Extract comment from the definition’s documentation.



28
29
30
# File 'lib/decode/rbs/wrapper.rb', line 28

def comment
  @comment ||= extract_comment
end

#tagsObject

Extract RBS tags from the definition’s documentation.



22
23
24
# File 'lib/decode/rbs/wrapper.rb', line 22

def tags
  @tags ||= extract_tags
end