module Cybele::Helpers::AppFiles::ViewFiles
Public Instance Methods
customize_default_view_files()
click to toggle source
# File lib/cybele/helpers/app_files/view_files.rb, line 20 def customize_default_view_files # Default view files dirs_to_directory( 'app_files/app/views/admin_mailer' => 'app/views/admin_mailer', 'app_files/app/views/user_mailer' => 'app/views/user_mailer' ) end
customize_view_files_with_option()
click to toggle source
# File lib/cybele/helpers/app_files/view_files.rb, line 7 def customize_view_files_with_option # View files with option dirs_to_directory( 'app_files/app/views/hq' => 'app/views/hq', 'app_files/app/views/user' => 'app/views/user', 'app_files/app/views/layouts/hq' => 'app/views/layouts/hq', 'app_files/app/views/layouts/partials' => 'app/views/layouts/partials', 'app_files/app/views/welcome' => 'app/views/welcome', 'app_files/public' => 'public' ) replace_erb_with_haml end
Private Instance Methods
remove_erb_files(template_files)
click to toggle source
# File lib/cybele/helpers/app_files/view_files.rb, line 30 def remove_erb_files(template_files) remove_file 'app/views/layouts/mailer.html.erb', force: true remove_files(template_files) end
replace_erb_with_haml()
click to toggle source
rubocop:disable Metrics/MethodLength rubocop:disable Metrics/LineLength
# File lib/cybele/helpers/app_files/view_files.rb, line 38 def replace_erb_with_haml template_files = %w[ app/views/welcome/index.html.haml.erb app/views/layouts/mailer.html.haml.erb app/views/layouts/application.html.haml.erb app/views/layouts/partials/_navbar.html.haml.erb app/views/layouts/hq/application.html.haml.erb app/views/layouts/hq/login.html.haml.erb ] remove_erb_files(template_files) files_to_template( 'app_files/app/views/welcome/index.html.haml.erb' => 'app/views/welcome/index.html.haml', 'app_files/app/views/layouts/mailer.html.haml.erb' => 'app/views/layouts/mailer.html.haml', 'app_files/app/views/layouts/application.html.haml.erb' => 'app/views/layouts/application.html.haml', 'app_files/app/views/layouts/partials/_navbar.html.haml.erb' => 'app/views/layouts/partials/_navbar.html.haml', 'app_files/app/views/layouts/hq/application.html.haml.erb' => 'app/views/layouts/hq/application.html.haml', 'app_files/app/views/layouts/hq/login.html.haml.erb' => 'app/views/layouts/hq/login.html.haml' ) end