Class: Blacksand::Generators::NewSiteGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Blacksand::Generators::NewSiteGenerator
- Defined in:
- lib/generators/blacksand/new_site_generator.rb
Instance Method Summary collapse
Instance Method Details
#new_site ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/generators/blacksand/new_site_generator.rb', line 7 def new_site puts "Create Site: #{name}" # site yaml create_file("db/sites/#{name}.yml", <<-YAML) # 模板 templates: # - your template # 原型 prototypes: # - your prototype YAML # site theme if yes?("Install theme #{name} ?(Y/n)") generate 'themes_on_rails:theme', name end end |