Sha256: 4af89c3b78488faef87d5921ca6222dcfcdfc19fb96b7b8b13f8f358d5701878
Contents?: true
Size: 615 Bytes
Versions: 3
Compression:
Stored size: 615 Bytes
Contents
# (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
3 entries across 3 versions & 1 rubygems