Sha256: 1566614067f66d43683dee4fb74b900ebb6005ff606c3fc8356040b50a92ed32
Contents?: true
Size: 600 Bytes
Versions: 4
Compression:
Stored size: 600 Bytes
Contents
# (see Ruby::PrivateConstantHandler) class YARD::Handlers::Ruby::Legacy::PrivateConstantHandler < YARD::Handlers::Ruby::Legacy::Base namespace_only handles /\Aprivate_constant(\s|\(|$)/ 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
4 entries across 4 versions & 1 rubygems