Skip to content

ppibburr/mruby-girffi-docgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

mruby-girffi-docgen

Generates YARD documentation for generated bindings

Example

 # Example of documenting Gtk
 # outputs to ./Gtk_<ObjectName>.rb
 # for all the GObjectIntrospection::IObjectInfo's


 # Ensure all the namespaces are loaded
 GirFFI::setup :Pango
 GirFFI::setup :Atk
 GirFFI::setup :Gdk
 GirFFI::setup :GdkPixbuf

 # Setup Gtk
 GirFFI::setup :Gtk

 # Document it
 dg = DocGen.new(Gtk)
 ns = dg.document()
 
 # Write out dummy source files for use by YARD
 YARDGenerator.generate(ns)

YARD Output

    # ...

    # webkit_favicon_database_get_favicon_pixbuf
    #
    # @param [String] page_uri 
    # @param [Integer] width 
    # @param [Integer] height 
    # @param [Gio::Cancellable] cancellable  defaults to `nil`
    # @yieldparam [GObject::Object] source_object
    # @yieldparam [FFI::Pointer] res
    # @yieldreturn [void] 
    # @return [NilClass] 
    def get_favicon_pixbuf(page_uri,width,height,cancellable = nil)
    end
    
    # ...

About

Generates YARD documentation for generated bindings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages