Sha256: 153a038f3042966f17fe46577f187bc0d9de7d3214e950be50e264ae7461c3a3

Contents?: true

Size: 601 Bytes

Versions: 3

Compression:

Stored size: 601 Bytes

Contents

# (see Ruby::PrivateClassMethodHandler)
class YARD::Handlers::Ruby::Legacy::PrivateClassMethodHandler < YARD::Handlers::Ruby::Legacy::Base
  handles /\Aprivate_class_method(\s|\(|$)/
  namespace_only

  process do
    tokval_list(statement.tokens[2..-1], :attr).each do |name|
      privatize_class_method name
    end
  end

  private

  def privatize_class_method(name)
    method = Proxy.new(namespace, name)
    ensure_loaded!(method)
    method.visibility = :private
  rescue NamespaceMissingError
    raise UndocumentableError, "private visibility set on unrecognized method: #{name}"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yard-0.8.7.6 lib/yard/handlers/ruby/legacy/private_class_method_handler.rb
yard-0.8.7.5 lib/yard/handlers/ruby/legacy/private_class_method_handler.rb
yard-0.8.7.4 lib/yard/handlers/ruby/legacy/private_class_method_handler.rb