Class: Hephaestus::Generators::Base
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Hephaestus::Generators::Base
- Includes:
- Actions, ExitOnFailure
- Defined in:
- lib/hephaestus/generators/base.rb
Direct Known Subclasses
ConfigGenerator, CoreGenerator, DeploymentGenerator, LibGenerator, LicenseGenerator, RubocopGenerator, SorbetGenerator
Class Method Summary collapse
Methods included from ExitOnFailure
Methods included from Actions
#action_mailer_asset_host, #action_mailer_host, #configure_environment, #expand_json, #gem, #replace_in_file, #replace_in_files
Class Method Details
.default_source_root ⇒ Object
14 15 16 |
# File 'lib/hephaestus/generators/base.rb', line 14 def default_source_root File.(File.join("..", "..", "..", "templates"), __dir__) end |
.inherited(subclass) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/hephaestus/generators/base.rb', line 18 def inherited(subclass) super description_file = File.( File.join( default_source_root, "descriptions", "#{subclass.generator_name}.md", ), ) subclass.desc(File.read(description_file)) rescue Errno::ENOENT # rubocop:disable Lint/SuppressedException end |