Module: Rubyzen::Providers::VisibilityProvider
- Defined in:
- lib/rubyzen/providers/visibility_provider.rb
Overview
Provides method visibility detection (public, private, protected).
Instance Method Summary collapse
-
#private? ⇒ Boolean
True if this declaration is private.
-
#protected? ⇒ Boolean
True if this declaration is protected.
-
#public? ⇒ Boolean
True if this declaration is public.
-
#visibility ⇒ Symbol
The visibility of this declaration (:public, :private, or :protected).
Instance Method Details
#private? ⇒ Boolean
Returns true if this declaration is private.
11 12 13 |
# File 'lib/rubyzen/providers/visibility_provider.rb', line 11 def private? visibility == :private end |
#protected? ⇒ Boolean
Returns true if this declaration is protected.
16 17 18 |
# File 'lib/rubyzen/providers/visibility_provider.rb', line 16 def protected? visibility == :protected end |
#public? ⇒ Boolean
Returns true if this declaration is public.
21 22 23 |
# File 'lib/rubyzen/providers/visibility_provider.rb', line 21 def public? visibility == :public end |
#visibility ⇒ Symbol
Returns the visibility of this declaration (:public, :private, or :protected).
6 7 8 |
# File 'lib/rubyzen/providers/visibility_provider.rb', line 6 def visibility determine_visibility end |