Module: ApplicationRecordMaker
- Extended by:
- Template
- Defined in:
- lib/umu/generators/application_record_maker.rb
Constant Summary
Constants included from Color
Class Method Summary collapse
Methods included from Template
checker, cover, hover, pointer
Class Method Details
.generator ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/umu/generators/application_record_maker.rb', line 10 def generator puts '#=> rails generate application_record' = Umu::Selector.single_choice('オプションを追加しますか?') cover(1) = '' = Umu::Inputter.input('オプションを入力してください', true) if cover(1) if command = "rails generate application_record #{options}" cover(1) puts command confirm_content = '上記コマンド実行しますか?' run_command = Umu::Selector.single_choice(confirm_content) cover(1) puts confirm_content + (run_command ? 'はい' : 'いいえ') system(command) if run_command true end |