Sha256: 49eb7b339d2e453672cbb7ae76bccb8ceccd02ae411fb3bdb098ceacac0841c1

Contents?: true

Size: 1.38 KB

Versions: 2

Compression:

Stored size: 1.38 KB

Contents

# frozen_string_literal: true

def init
  # It seems YARD messes things up so that a lot of classes, modules and constants are not properly
  # registered in their enclosing namespaces.
  # This hack makes sure that if that is the case we fix that here.
  all_objects = Registry.all(:class, :constant, :module)
  all_objects.each do |c|
    if (ns = c.namespace)
      unless ns.children.any? { |nsc| nsc.path == c.path }
        ns.children << c # class/module/constant missing from child list of enclosing namespace -> add here
      end
    end
    if (ns = Registry[c.namespace.path])
      unless ns.children.any? { |nsc| nsc.path == c.path }
        ns.children << c # class/module/constant missing from child list of enclosing namespace -> add here
      end
    end
  end
  super
end

def stylesheets_full_list
  super + %w(css/wxruby3.css)
end

def logo_and_version
  wxver = Registry['Wx::WXRUBY_VERSION']
  wxwver = Registry['Wx::WXWIDGETS_VERSION']
  <<~__HTML
  <div class='wxrb-logo'>
    <img src='assets/logo.png' height='38'/>
    <table><tbody>
      <tr><td><span class='wxrb-name'><a href="https://github.com/mcorino/wxRuby3">wxRuby3</a></span></td><td><span class='wxrb-version'>Version: #{::Kernel.eval(wxver.value)}</span></td></tr>
      <tr><td></td><td><span class="wxrb-wxver">(wxWidgets: #{::Kernel.eval(wxwver.value)})</span></td></tr>
    </tbody></table>
  </div>
  __HTML
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wxruby3-0.9.8 rakelib/yard/templates/default/fulldoc/html/setup.rb
wxruby3-0.9.7 rakelib/yard/templates/default/fulldoc/html/setup.rb