Sha256: 5654c5b4610102a2af45cae155fd91e4ad66e778a01674dd42888665ca577c04
Contents?: true
Size: 625 Bytes
Versions: 63
Compression:
Stored size: 625 Bytes
Contents
# frozen_string_literal: true # (see Ruby::PrivateConstantHandler) class YARD::Handlers::Ruby::Legacy::PrivateConstantHandler < YARD::Handlers::Ruby::Legacy::Base handles(/\Aprivate_constant(\s|\(|$)/) namespace_only process do tokval_list(statement.tokens[2..-1], :attr, TkCONSTANT).each do |name| privatize_constant name end end private def privatize_constant(name) const = Proxy.new(namespace, name) ensure_loaded!(const) const.visibility = :private rescue NamespaceMissingError raise UndocumentableError, "private visibility set on unrecognized constant: #{name}" end end
Version data entries
63 entries across 62 versions & 9 rubygems