Class: EacRubyBase1::RootModuleSetup

Inherits:
Object
  • Object
show all
Defined in:
lib/eac_ruby_base1/root_module_setup.rb,
lib/eac_ruby_base1/root_module_setup/paths.rb,
lib/eac_ruby_base1/root_module_setup/ignore.rb,
lib/eac_ruby_base1/root_module_setup/patches.rb,
lib/eac_ruby_base1/root_module_setup/requires.rb,
lib/eac_ruby_base1/root_module_setup/zeitwerk.rb,
lib/eac_ruby_base1/root_module_setup/constants.rb,
lib/eac_ruby_base1/root_module_setup/require_patch.rb

Defined Under Namespace

Modules: Constants, Patches, Paths, Requires, Zeitwerk Classes: Ignore, RequirePatch

Constant Summary collapse

DEFAULT_NAMESPACE =
::Object
LIB_DIRECTORY_BASENAME =
'lib'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root_module_file, &block) ⇒ RootModuleSetup

Returns a new instance of RootModuleSetup.

Parameters:

  • root_module_file (Pathname)


25
26
27
28
# File 'lib/eac_ruby_base1/root_module_setup.rb', line 25

def initialize(root_module_file, &block)
  self.root_module_file = root_module_file.to_pathname
  self.block = block
end

Instance Attribute Details

#blockObject

Returns the value of attribute block.



21
22
23
# File 'lib/eac_ruby_base1/root_module_setup.rb', line 21

def block
  @block
end

#logging=(value) ⇒ Object (writeonly)

Sets the attribute logging

Parameters:

  • value

    the value to set the attribute logging to.



22
23
24
# File 'lib/eac_ruby_base1/root_module_setup.rb', line 22

def logging=(value)
  @logging = value
end

Class Method Details

.perform(root_module_file) ⇒ Object

Parameters:

  • root_module_file (Pathname)


16
17
18
# File 'lib/eac_ruby_base1/root_module_setup.rb', line 16

def perform(root_module_file, &)
  new(root_module_file, &).perform
end

Instance Method Details

#performvoid

This method returns an undefined value.



31
32
33
34
35
36
37
# File 'lib/eac_ruby_base1/root_module_setup.rb', line 31

def perform
  perform_block
  perform_zeitwerk
  root_module
  perform_requires
  require_patches
end