Class: ConvenientService::Utils::Module::HasOwnInstanceMethod Private
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Utils::Module::HasOwnInstanceMethod
- Defined in:
- lib/convenient_service/utils/module/has_own_instance_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
- #mod ⇒ Object readonly private
- #private ⇒ Object readonly private
Instance Method Summary collapse
- #call ⇒ Boolean private
- #initialize(mod, method_name, private: false) ⇒ void constructor private
Methods inherited from Support::Command
Constructor Details
#initialize(mod, method_name, private: false) ⇒ void
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.
36 37 38 39 40 |
# File 'lib/convenient_service/utils/module/has_own_instance_method.rb', line 36 def initialize(mod, method_name, private: false) @mod = mod @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/module/has_own_instance_method.rb', line 22 def method_name @method_name end |
#mod ⇒ 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/module/has_own_instance_method.rb', line 16 def mod @mod 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/module/has_own_instance_method.rb', line 28 def private @private end |
Instance Method Details
#call ⇒ Boolean
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.
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/convenient_service/utils/module/has_own_instance_method.rb', line 45 def call method = method_name.to_sym return true if own_instance_methods.include?(method) if private return true if private_own_instance_methods.include?(method) end false end |