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
climine-0.0.2 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/c/override_comment_handler.rb
climine-0.0.1 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/handlers/c/override_comment_handler.rb
yard-0.8.7.3 lib/yard/handlers/c/override_comment_handler.rb
yard-0.8.7.2 lib/yard/handlers/c/override_comment_handler.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/yard-0.8.7/lib/yard/handlers/c/override_comment_handler.rb
candlepin-api-0.4.0 bundle/ruby/gems/yard-0.8.7/lib/yard/handlers/c/override_comment_handler.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/yard-0.8.7/lib/yard/handlers/c/override_comment_handler.rb
yard-0.8.7.1 lib/yard/handlers/c/override_comment_handler.rb
yard-0.8.7 lib/yard/handlers/c/override_comment_handler.rb
challah-1.0.0 vendor/bundle/gems/yard-0.8.6.1/lib/yard/handlers/c/override_comment_handler.rb
yard-0.8.6.2 lib/yard/handlers/c/override_comment_handler.rb
challah-1.0.0.beta3 vendor/bundle/gems/yard-0.8.6/lib/yard/handlers/c/override_comment_handler.rb
challah-1.0.0.beta3 vendor/bundle/gems/yard-0.8.6.1/lib/yard/handlers/c/override_comment_handler.rb
challah-1.0.0.beta3 vendor/bundle/gems/yard-0.8.5.2/lib/yard/handlers/c/override_comment_handler.rb
sidekiq-statsd-0.1.1 vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/handlers/c/override_comment_handler.rb
sidekiq-statsd-0.1.0 vendor/ruby/1.9.1/gems/yard-0.8.6.1/lib/yard/handlers/c/override_comment_handler.rb
yard-0.8.6.1 lib/yard/handlers/c/override_comment_handler.rb
challah-1.0.0.beta2 vendor/bundle/gems/yard-0.8.6/lib/yard/handlers/c/override_comment_handler.rb
challah-1.0.0.beta2 vendor/bundle/gems/yard-0.8.5.2/lib/yard/handlers/c/override_comment_handler.rb
yard-0.8.6 lib/yard/handlers/c/override_comment_handler.rb