Skip to content

Commit

Permalink
TODO: use Spoom for docs
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Terrasa <[email protected]>
  • Loading branch information
Morriar committed Nov 6, 2024
1 parent 7300629 commit 76c6406
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/tapioca/gem/listeners/yard_doc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class YardDoc < Base

IGNORED_SIG_TAGS = T.let(["param", "return"], T::Array[String])

# TODO: remove
sig { params(pipeline: Pipeline).void }
def initialize(pipeline)
YARD::Registry.clear
Expand Down Expand Up @@ -53,6 +54,8 @@ def on_method(event)

sig { params(name: String, sigs: T::Array[RBI::Sig]).returns(T::Array[RBI::Comment]) }
def documentation_comments(name, sigs: [])
# @pipeline.model.symbols[name].map { |symbol_def| symbol_def.comments }.join("\n")

yard_docs = YARD::Registry.at(name)
return [] unless yard_docs

Expand Down
5 changes: 5 additions & 0 deletions lib/tapioca/gem/pipeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class Pipeline
sig { returns(T.proc.params(error: String).void) }
attr_reader :error_handler

# attr_reader :model

sig do
params(
gem: Gemfile::GemSpec,
Expand All @@ -38,6 +40,9 @@ def initialize(

@events = T.let([], T::Array[Gem::Event])

# @model = Static::SymbolLoader.load_model(@gem)
# bootstrap_symbols = @model.symbols.keys.to_set

@payload_symbols = T.let(Static::SymbolLoader.payload_symbols, T::Set[String])
@bootstrap_symbols = T.let(load_bootstrap_symbols(@gem), T::Set[String])

Expand Down

0 comments on commit 76c6406

Please sign in to comment.