Class: Suspenders::Generators::Base
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Suspenders::Generators::Base
- Includes:
- Actions
- Defined in:
- lib/suspenders/generators/base.rb
Direct Known Subclasses
AdvisoriesGenerator, AnalyticsGenerator, CiGenerator, DbOptimizationsGenerator, FactoriesGenerator, FormsGenerator, InlineSvgGenerator, JobsGenerator, JsDriverGenerator, JsonGenerator, LintGenerator, PreloaderGenerator, Production::CompressionGenerator, Production::DeploymentGenerator, Production::EmailGenerator, Production::ForceTlsGenerator, Production::ManifestGenerator, Production::SingleRedirect, Production::TimeoutGenerator, ProfilerGenerator, RunnerGenerator, Staging::PullRequestsGenerator, StaticGenerator, StylelintGenerator, StylesheetBaseGenerator, TestingGenerator, ViewsGenerator
Class Method Summary collapse
Methods included from Actions
#action_mailer_asset_host, #action_mailer_host, #configure_environment, #expand_json, #replace_in_file
Class Method Details
.default_source_root ⇒ Object
9 10 11 |
# File 'lib/suspenders/generators/base.rb', line 9 def self.default_source_root File.(File.join("..", "..", "..", "templates"), __dir__) end |
.inherited(subclass) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/suspenders/generators/base.rb', line 13 def self.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 end |