Class: ConvenientService::Utils::Module::IncludeModule

Inherits:
Support::Command show all
Defined in:
lib/convenient_service/utils/module/include_module.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Support::Command

[], call

Constructor Details

#initialize(mod, other_mod) ⇒ void

Parameters:



24
25
26
27
# File 'lib/convenient_service/utils/module/include_module.rb', line 24

def initialize(mod, other_mod)
  @mod = mod
  @other_mod = other_mod
end

Instance Attribute Details

#modObject (readonly)

Returns the value of attribute mod.



11
12
13
# File 'lib/convenient_service/utils/module/include_module.rb', line 11

def mod
  @mod
end

#other_modObject (readonly)

Returns the value of attribute other_mod.



17
18
19
# File 'lib/convenient_service/utils/module/include_module.rb', line 17

def other_mod
  @other_mod
end

Instance Method Details

#callBoolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/convenient_service/utils/module/include_module.rb', line 32

def call
  mod.included_modules.include?(other_mod)
end