Sha256: 4f80caa777f9e6af81dbe230a1ea2666ee0dc5863786a817cdfdc3c44f91adbf

Contents?: true

Size: 437 Bytes

Versions: 7

Compression:

Stored size: 437 Bytes

Contents

# (see Ruby::ExtendHandler)
class YARD::Handlers::Ruby::Legacy::ExtendHandler < YARD::Handlers::Ruby::Legacy::MixinHandler
  handles /\Aextend(\s|\()/

  def scope; :class end

  private

  def process_mixin(mixin)
    if mixin == "self"
      if namespace.is_a?(ClassObject)
        raise UndocumentableError, "extend(self) statement on class"
      end
      namespace.mixins(scope) << namespace
    else
      super
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
yard-0.6.8 lib/yard/handlers/ruby/legacy/extend_handler.rb
yard-0.6.7 lib/yard/handlers/ruby/legacy/extend_handler.rb
yard-0.6.6 lib/yard/handlers/ruby/legacy/extend_handler.rb
yard-0.6.5 lib/yard/handlers/ruby/legacy/extend_handler.rb
yard-0.6.4 lib/yard/handlers/ruby/legacy/extend_handler.rb
yard-0.6.3 lib/yard/handlers/ruby/legacy/extend_handler.rb
yard-0.6.2 lib/yard/handlers/ruby/legacy/extend_handler.rb