class Reflective::MethodInfo
Attributes
visibility[R]
Public Class Methods
new(constant, method_name, visibility: :public)
click to toggle source
# File lib/reflective/method_info.rb, line 3 def initialize(constant, method_name, visibility: :public) @method = Module.instance_method(:instance_method).bind(constant).call(method_name) @visibility = visibility end
Public Instance Methods
owner()
click to toggle source
# File lib/reflective/method_info.rb, line 10 def owner @method.owner end
private?()
click to toggle source
# File lib/reflective/method_info.rb, line 22 def private? visibility == :private end
protected?()
click to toggle source
# File lib/reflective/method_info.rb, line 18 def protected? visibility == :protected end
public?()
click to toggle source
# File lib/reflective/method_info.rb, line 14 def public? visibility == :public end
static?()
click to toggle source
# File lib/reflective/method_info.rb, line 26 def static? Module.instance_method(:singleton_class?).bind(owner).call end