Sha256: a40c5b7e9cbe6ee9843078d9345a2dc58f822a12a761c552910eb8530fe64f61

Contents?: true

Size: 632 Bytes

Versions: 8

Compression:

Stored size: 632 Bytes

Contents

# Handles 'private', 'protected', and 'public' calls.
class YARD::Handlers::Ruby::VisibilityHandler < YARD::Handlers::Ruby::Base
  include YARD::Handlers::Ruby::DecoratorHandlerMethods

  handles method_call(:private)
  handles method_call(:protected)
  handles method_call(:public)
  namespace_only

  process do
    return if (ident = statement.jump(:ident)) == statement
    case statement.type
    when :var_ref, :vcall
      self.visibility = ident.first.to_sym
    when :fcall, :command
      process_decorator do |method|
        method.visibility = ident.first if method.respond_to? :visibility=
      end
    end
  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/visibility_handler.rb
abaci-0.3.0 vendor/bundle/gems/yard-0.9.1/lib/yard/handlers/ruby/visibility_handler.rb
yard-0.9.5 lib/yard/handlers/ruby/visibility_handler.rb
yard-0.9.4 lib/yard/handlers/ruby/visibility_handler.rb
yard-0.9.3 lib/yard/handlers/ruby/visibility_handler.rb
yard-0.9.2 lib/yard/handlers/ruby/visibility_handler.rb
yard-0.9.1 lib/yard/handlers/ruby/visibility_handler.rb
yard-0.9.0 lib/yard/handlers/ruby/visibility_handler.rb