Class: ConvenientService::Utils::Object::GetOwnMethod Private
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Utils::Object::GetOwnMethod
- Defined in:
- lib/convenient_service/utils/object/get_own_method.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #method_name ⇒ Object readonly private
- #object ⇒ Object readonly private
- #private ⇒ Object readonly private
Instance Method Summary collapse
- #call ⇒ Method private
-
#initialize(object, method_name, private: false) ⇒ GetOwnMethod
constructor
private
A new instance of GetOwnMethod.
Methods inherited from Support::Command
Constructor Details
#initialize(object, method_name, private: false) ⇒ GetOwnMethod
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of GetOwnMethod.
35 36 37 38 39 |
# File 'lib/convenient_service/utils/object/get_own_method.rb', line 35 def initialize(object, method_name, private: false) @object = object @method_name = method_name @private = private end |
Instance Attribute Details
#method_name ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 |
# File 'lib/convenient_service/utils/object/get_own_method.rb', line 22 def method_name @method_name end |
#object ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/convenient_service/utils/object/get_own_method.rb', line 16 def object @object end |
#private ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 |
# File 'lib/convenient_service/utils/object/get_own_method.rb', line 28 def private @private end |
Instance Method Details
#call ⇒ Method
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
49 50 51 52 53 54 55 |
# File 'lib/convenient_service/utils/object/get_own_method.rb', line 49 def call own_method = Utils::Module.get_own_instance_method(object.class, method_name, private: private) return unless own_method own_method.bind(object) end |