Class: Rails::Archer::AppBuilder

Inherits:
Rails::AppBuilder
  • Object
show all
Defined in:
lib/rails-archer/generators/app/app_builder.rb

Instance Method Summary collapse

Instance Method Details

#appObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/rails-archer/generators/app/app_builder.rb', line 8

def app
  empty_directory 'app'
  inside 'app' do
    empty_directory 'assets'
    inside 'assets' do
      empty_directory_with_gitkeep 'images'
      directory 'javascripts'
      directory 'stylesheets'
    end
    directory 'controllers'
    directory 'helpers'
    empty_directory_with_gitkeep 'mailers'
    empty_directory_with_gitkeep 'models'
    directory 'views'
  end
end

#leftoversObject



36
37
# File 'lib/rails-archer/generators/app/app_builder.rb', line 36

def leftovers
end

#public_directoryObject



25
26
27
28
29
30
31
32
33
34
# File 'lib/rails-archer/generators/app/app_builder.rb', line 25

def public_directory
  empty_directory 'public'
  inside 'public' do
    template '404.html'
    template '422.html'
    template '500.html'
    template 'favicon.ico'
    template 'robots.txt'
  end
end

#readmeObject



4
5
6
# File 'lib/rails-archer/generators/app/app_builder.rb', line 4

def readme
  copy_file 'README', 'README.md'
end