Sha256: 472cc71bc7613389e43f9b0f6097e8093327b06944b88f849d3cbcb8eb609b89

Contents?: true

Size: 412 Bytes

Versions: 2

Compression:

Stored size: 412 Bytes

Contents

# Handles 'extend' call to include modules into the class scope of another
# @see MixinHandler
class YARD::Handlers::Ruby::ExtendHandler < YARD::Handlers::Ruby::MixinHandler
  namespace_only
  handles method_call(:extend)

  def scope; :class end

  private

  def process_mixin(mixin)
    if mixin == s(:var_ref, s(:kw, "self"))
      namespace.mixins(scope) << namespace
    else
      super
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yard-0.6.1 lib/yard/handlers/ruby/extend_handler.rb
yard-0.6.0 lib/yard/handlers/ruby/extend_handler.rb