Class: ConvenientService::Utils::Module::IncludeModule Private
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Utils::Module::IncludeModule
- Defined in:
- lib/convenient_service/utils/module/include_module.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
- #mod ⇒ Object readonly private
- #other_mod ⇒ Object readonly private
Instance Method Summary collapse
- #call ⇒ Boolean private
- #initialize(mod, other_mod) ⇒ void constructor private
Methods inherited from Support::Command
Constructor Details
#initialize(mod, other_mod) ⇒ 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.
29 30 31 32 |
# File 'lib/convenient_service/utils/module/include_module.rb', line 29 def initialize(mod, other_mod) @mod = mod @other_mod = other_mod end |
Instance Attribute Details
#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/include_module.rb', line 16 def mod @mod end |
#other_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.
22 23 24 |
# File 'lib/convenient_service/utils/module/include_module.rb', line 22 def other_mod @other_mod 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.
37 38 39 |
# File 'lib/convenient_service/utils/module/include_module.rb', line 37 def call mod.ancestors.drop_while { |ancestor| ancestor != mod }.include?(other_mod) end |