Class: ConvenientService::Utils::Method::Remove Private
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Utils::Method::Remove
- Defined in:
- lib/convenient_service/utils/method/remove.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
- #klass ⇒ Object readonly private
- #method ⇒ Object readonly private
- #private ⇒ Object readonly private
- #protected ⇒ Object readonly private
- #public ⇒ Object readonly private
Instance Method Summary collapse
- #call ⇒ Class private
- #initialize(method, klass, public: true, protected: true, private: false) ⇒ void constructor private
Methods inherited from Support::Command
Constructor Details
#initialize(method, klass, public: true, protected: true, 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.
54 55 56 57 58 59 60 |
# File 'lib/convenient_service/utils/method/remove.rb', line 54 def initialize(method, klass, public: true, protected: true, private: false) @method = method.to_s @klass = klass @public = public @protected = protected @private = private end |
Instance Attribute Details
#klass ⇒ 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/method/remove.rb', line 22 def klass @klass end |
#method ⇒ 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/method/remove.rb', line 16 def method @method 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.
40 41 42 |
# File 'lib/convenient_service/utils/method/remove.rb', line 40 def private @private end |
#protected ⇒ 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.
34 35 36 |
# File 'lib/convenient_service/utils/method/remove.rb', line 34 def protected @protected end |
#public ⇒ 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/method/remove.rb', line 28 def public @public end |
Instance Method Details
#call ⇒ Class
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.
69 70 71 72 73 |
# File 'lib/convenient_service/utils/method/remove.rb', line 69 def call return unless Utils::Method.defined?(method, klass, public: public, protected: protected, private: private) klass.remove_method method end |