Module: Decors::Utils
- Defined in:
- lib/decors/utils.rb
Class Method Summary collapse
Class Method Details
.method_visibility(method) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/decors/utils.rb', line 6 def method_visibility(method) if method.owner.private_method_defined?(method.name) :private elsif method.owner.protected_method_defined?(method.name) :protected elsif method.owner.public_method_defined?(method.name) :public else raise ArgumentError, 'Unkwnown method' end end |