Class: Balrog::ViewGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Balrog::ViewGenerator
- Defined in:
- lib/balrog/generators/view_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_gate_view ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/balrog/generators/view_generator.rb', line 4 def copy_gate_view gate_view = File.open( File.join(__dir__, '../../../', 'app/views/balrog/gate.html.erb'), 'r') content = gate_view.read gate_view.close create_file "app/views/balrog/gate.html.erb", content end |
#copy_layout ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/balrog/generators/view_generator.rb', line 15 def copy_layout gate_view = File.open( File.join(__dir__, '../../../', 'app/views/layouts/balrog.html.erb'), 'r') content = gate_view.read gate_view.close create_file "app/views/layouts/balrog.html.erb", content end |