class YARD::Handlers::Ruby::Legacy::MixinHandler

(see Ruby::MixinHandler)

Private Instance Methods

process_mixin(mixin) click to toggle source
# File lib/yard/handlers/ruby/legacy/mixin_handler.rb, line 25
def process_mixin(mixin)
  unless mixmatch = mixin[/\A(#{NAMESPACEMATCH})/, 1]
    raise YARD::Parser::UndocumentableError
  end

  case obj = Proxy.new(namespace, mixmatch)
  when ConstantObject # If a constant is included, use its value as the real object
    obj = Proxy.new(namespace, obj.value, :module)
  else
    obj = Proxy.new(namespace, mixmatch, :module)
  end

  namespace.mixins(scope).unshift(obj) unless namespace.mixins(scope).include?(obj)
end