Skip to content

Support for non-apidoc comments #2

@aaronbartell

Description

@aaronbartell

I have a standard Ruby doc block in the header of my program that isn't suffixed with 'apidoc' but instead just 'documentation':

=begin documetation
some documentation about the class
=end

This causes rapi_doc to error because it doesn't take into account that there might be doc blocks in the code that don't start as follows:

=begin apidoc

The code that is problematic is as follows:

    File.open(controller_location).each do |line|
        if line =~ /=begin apidoc/
          current_scope = !inclass ? :class : :function
          current_api_block = MethodDoc.new(current_scope)
        elsif line =~ /=end/       **<-----This code right here**
          if current_api_block.nil? 
            puts "#{controller_location}:#{lineno} - No starttag for =end found"
            exit

AaronBartell.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions