Skip to content

Support sorbet's sig #38

@christi-stripe

Description

@christi-stripe

See https://sorbet.org/docs/sigs for information on method signatures.

Given this example:

    # This is the mymethod1 comment
    sig do
      params(
        # This is an integer
        anint: Integer,
        # This is a string
        astring: String
      ).void
    end
    def self.mymethod1(anint, astring)
      # ...
    end

    # This is the mymethod2 comment
    def self.mymethod2(anint, astring)
      # ...
    end

    # This is the mymethod3 comment
    #
    # :args: anint, astring
    #
    def self.mymethod3(anint, astring)
      # ...
    end

the following markdown is generated:

 ### mymethod1(anint, astring) [](#method-c-mymethod1)
 ### mymethod2(anint, astring) [](#method-c-mymethod2)
 This is the mymethod2 comment

 ### mymethod3(anint, astring) [](#method-c-mymethod3)
 This is the mymethod3 comment

mymethod1 uses Sorbet's sig and you can see it has no generated documentation at all.

mymethod2 and mymethod3 do not use sig and the method comment is included in the generated markdown.

I attempted to use :args: with mymethod3 and it did not change anything, so I filed #37 separately.

mymethod4 moved to #39

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions