Class: Kube::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Kube::Generators::InstallGenerator
- Defined in:
- lib/generators/kube/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_assets ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/generators/kube/install/install_generator.rb', line 10 def add_assets if File.exist?('app/assets/stylesheets/application.css') content = File.read("app/assets/stylesheets/application.css") unless content.match(/require_tree\s+\.\s*$/) style_require_block = " *= require kube\n" insert_into_file "app/assets/stylesheets/application.css", style_require_block, :after => "require_self\n" end else copy_file "application.css", "app/assets/stylesheets/application.css" end end |
#add_kube ⇒ Object
22 23 24 |
# File 'lib/generators/kube/install/install_generator.rb', line 22 def add_kube copy_file "kube.less", "app/assets/stylesheets/kube.css.less" end |