Class: Modulorails::Generators::Base
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Modulorails::Generators::Base
show all
- Defined in:
- lib/modulorails/generators/base.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.base_root ⇒ Object
12
13
14
|
# File 'lib/modulorails/generators/base.rb', line 12
def self.base_root
File.expand_path('../../generators', __dir__)
end
|
Instance Method Details
#call ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/modulorails/generators/base.rb', line 18
def call
return if keep_file_present? && !options['force']
begin
create_config
create_keep_file
rescue StandardError => e
warn("[Modulorails][#{generator_name}] Error: #{e.message}")
warn(e.backtrace.join("\n"))
end
end
|