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