module Decors::Utils
Public Class Methods
method_visibility(method)
click to toggle source
# 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