Class: Pu::Eject::LayoutGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Pu::Eject::LayoutGenerator
- Includes:
- PlutoniumGenerators::Generator
- Defined in:
- lib/generators/pu/eject/layout/layout_generator.rb
Instance Method Summary collapse
Methods included from PlutoniumGenerators::Generator
Methods included from PlutoniumGenerators::Concerns::Logger
#debug, #error, #exception, #info, #success, #warn
Methods included from PlutoniumGenerators::Concerns::Config
Instance Method Details
#start ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/generators/pu/eject/layout/layout_generator.rb', line 16 def start destination_dir = (destination_portal == "main_app") ? "app/views/" : "packages/#{destination_portal}/app/views/" [ "layouts/resource.html.erb" ].each do |file| copy_file Plutonium.root.join("app", "views", file), Rails.root.join(destination_dir, file) end rescue => e exception "#{self.class} failed:", e end |