Class: EacRubyBase1::RootModuleSetup::RequirePatch

Inherits:
Object
  • Object
show all
Defined in:
lib/eac_ruby_base1/root_module_setup/require_patch.rb

Instance Method Summary collapse

Instance Method Details

#ignore_pathPathname

Returns:

  • (Pathname)


23
24
25
26
# File 'lib/eac_ruby_base1/root_module_setup/require_patch.rb', line 23

def ignore_path
  absolute_path.relative_path_from(setup.root_module_directory)
    .basename_sub { |b| b.basename('.*') }
end

#perform_ignorevoid

This method returns an undefined value.



34
35
36
# File 'lib/eac_ruby_base1/root_module_setup/require_patch.rb', line 34

def perform_ignore
  setup.ignore ignore_path
end

#perform_requirevoid

This method returns an undefined value.



29
30
31
# File 'lib/eac_ruby_base1/root_module_setup/require_patch.rb', line 29

def perform_require
  ::Kernel.require require_path
end

#require_pathPathname

Returns:

  • (Pathname)


39
40
41
# File 'lib/eac_ruby_base1/root_module_setup/require_patch.rb', line 39

def require_path
  setup.relative_root_module_file.join(ignore_path)
end

#resultvoid

This method returns an undefined value.



17
18
19
20
# File 'lib/eac_ruby_base1/root_module_setup/require_patch.rb', line 17

def result
  perform_require
  perform_ignore
end