Method: Charyf::Generators.fallbacks

Defined in:
lib/charyf/utils/generators.rb

.fallbacksObject

Hold configured generators fallbacks. If a plugin developer wants a generator group to fallback to another group in case of missing generators, they can add a fallback.

For example, shoulda is considered a test_framework and is an extension of test_unit. However, most part of shoulda generators are similar to test_unit ones.

Shoulda then can tell generators to search for test_unit generators when some of them are not available by adding a fallback:

Charyf::Generators.fallbacks[:shoulda] = :test_unit


163
164
165
# File 'lib/charyf/utils/generators.rb', line 163

def fallbacks
  @fallbacks ||= {}
end