Class: Homebrew::DevCmd::Rubydoc Private

Inherits:
AbstractCommand show all
Defined in:
dev-cmd/rubydoc.rb,
sorbet/rbi/dsl/homebrew/dev_cmd/rubydoc.rbi

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Defined Under Namespace

Classes: Args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, dev_cmd?, #initialize, parser

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#argsHomebrew::DevCmd::Rubydoc::Args

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



10
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/rubydoc.rbi', line 10

def args; end

#runvoid

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'dev-cmd/rubydoc.rb', line 20

def run
  Homebrew.install_bundler_gems!(groups: ["doc"])

  HOMEBREW_LIBRARY_PATH.cd do |dir|
    no_api_args = if args.only_public?
      ["--hide-api", "private", "--hide-api", "internal"]
    else
      []
    end

    output_dir = dir/"doc"

    safe_system "bundle", "exec", "yard", "doc", "--fail-on-warning", *no_api_args, "--output", output_dir

    exec_browser "file://#{output_dir}/index.html" if args.open?
  end
end