Class: RailsBestPractices::Core::Modules

Inherits:
Array
  • Object
show all
Defined in:
lib/rails_best_practices/core/modules.rb

Overview

Module container

Direct Known Subclasses

Helpers

Instance Method Summary collapse

Instance Method Details

#add_module_decendant(module_name, decendant) ⇒ Object

add module decendant.

Parameters:

  • module (String)

    name

  • decendant (String)

    name



10
11
12
13
# File 'lib/rails_best_practices/core/modules.rb', line 10

def add_module_decendant(module_name, decendant)
  mod = find { |mod| mod.to_s == module_name }
  mod.add_decendant(decendant) if mod
end