Module: ApplicationRecordMaker
- Extended by:
- Template
- Defined in:
- lib/umu/generators/application_record_maker.rb
Overview
ApplicationRecordMaker is a module for generating application_record.
Constant Summary
Constants included from Color
Class Method Summary collapse
Methods included from Template
checker, command, cover, hover, logo, pointer, show_command
Class Method Details
.generator ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/umu/generators/application_record_maker.rb', line 12 def generator show_command('application_record') = Umu::Selector.single_choice(I18n.t('common.make_options')) cover(1) = '' = Umu::Inputter.input(I18n.t('common.add_option'), true) if cover(1) if command = command('application_record', ) cover(1) puts command confirm_content = I18n.t('common.run_command') run_command = Umu::Selector.single_choice(confirm_content) cover(1) puts confirm_content + (run_command ? I18n.t('affirm') : I18n.t('deny')) system(command) if run_command true end |