Class: LazyRails::PromptGenerators::AskAppName
- Defined in:
- lib/lazy_rails/prompt_generators.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from LazyRails::PromptGenerators::Base
Instance Method Details
#call ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'lib/lazy_rails/prompt_generators.rb', line 53 def call prompt.ask("What is the name of your project?") do |q| q.default "rails-app-#{Time.now.to_i}" q.required true q.validate(/\A[\w-]+\z/) q.[:valid?] = "Project name can only contain letters, numbers, underscores, and dashes" end end |