Class: Pu::Eject::ShellGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Pu::Eject::ShellGenerator
- Includes:
- PlutoniumGenerators::Generator
- Defined in:
- lib/generators/pu/eject/shell/shell_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
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/generators/pu/eject/shell/shell_generator.rb', line 14 def start destination_dir = (destination_portal == "main_app") ? "app/views/" : "packages/#{destination_portal}/app/views" [ "plutonium/_resource_header.html.erb", "plutonium/_resource_sidebar.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 |