Sha256: ba4cbf6ce3a075a26ba673896314b4c93afbbe281dde41bd58093271c42da96b

Contents?: true

Size: 617 Bytes

Versions: 8

Compression:

Stored size: 617 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 YARD::Handlers::NamespaceMissingError
    raise UndocumentableError, "private visibility set on unrecognized method: #{name}"
  end
end

Version data entries

8 entries across 7 versions & 2 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/yard-0.9.2/lib/yard/handlers/ruby/legacy/private_class_method_handler.rb
abaci-0.3.0 vendor/bundle/gems/yard-0.9.1/lib/yard/handlers/ruby/legacy/private_class_method_handler.rb
yard-0.9.5 lib/yard/handlers/ruby/legacy/private_class_method_handler.rb
yard-0.9.4 lib/yard/handlers/ruby/legacy/private_class_method_handler.rb
yard-0.9.3 lib/yard/handlers/ruby/legacy/private_class_method_handler.rb
yard-0.9.2 lib/yard/handlers/ruby/legacy/private_class_method_handler.rb
yard-0.9.1 lib/yard/handlers/ruby/legacy/private_class_method_handler.rb
yard-0.9.0 lib/yard/handlers/ruby/legacy/private_class_method_handler.rb