Sha256: 6ee46ca5e452ebc7cd880cc353873703ffe0c66ec048d2ae1f6768ec1d56f58e

Contents?: true

Size: 850 Bytes

Versions: 71

Compression:

Stored size: 850 Bytes

Contents

# Parses comments
class YARD::Handlers::C::OverrideCommentHandler < YARD::Handlers::C::Base
  handles %r{.}
  statement_class Comment

  process do
    return if statement.overrides.empty?
    statement.overrides.each do |type, name|
      override_comments << [name, statement]
      obj = nil
      case type
      when :class
        name, superclass = *name.split(/\s*<\s*/)
        obj = YARD::CodeObjects::ClassObject.new(:root, name)
        obj.superclass = "::#{superclass}" if superclass
      when :module
        obj = YARD::CodeObjects::ModuleObject.new(:root, name)
      end
      register(obj)
    end
  end

  def register_docstring(object, docstring = statement.source, stmt = statement)
    super
  end

  def register_file_info(object, file = parser.file, line = statement.line, comments = statement.comments)
    super
  end
end

Version data entries

71 entries across 56 versions & 8 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/yard-0.9.2/lib/yard/handlers/c/override_comment_handler.rb
abaci-0.3.0 vendor/bundle/gems/yard-0.9.1/lib/yard/handlers/c/override_comment_handler.rb
yard-0.9.5 lib/yard/handlers/c/override_comment_handler.rb
yard-0.9.4 lib/yard/handlers/c/override_comment_handler.rb
yard-0.9.3 lib/yard/handlers/c/override_comment_handler.rb
yard-0.9.2 lib/yard/handlers/c/override_comment_handler.rb
yard-0.9.1 lib/yard/handlers/c/override_comment_handler.rb
yard-0.9.0 lib/yard/handlers/c/override_comment_handler.rb
yard-0.8.7.6 lib/yard/handlers/c/override_comment_handler.rb
yard-0.8.7.5 lib/yard/handlers/c/override_comment_handler.rb
climine-0.0.7 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/c/override_comment_handler.rb
climine-0.0.7 vendor/bundle/ruby/2.1.0/gems/yard-0.8.7.3/lib/yard/handlers/c/override_comment_handler.rb
climine-0.0.6 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/c/override_comment_handler.rb
climine-0.0.5 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/c/override_comment_handler.rb
yard-0.8.7.4 lib/yard/handlers/c/override_comment_handler.rb
climine-0.0.4 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/c/override_comment_handler.rb
climine-0.0.3 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/c/override_comment_handler.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/yard-0.8.7.3/lib/yard/handlers/c/override_comment_handler.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/c/override_comment_handler.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/c/override_comment_handler.rb