Class: YMDP::Generator::Templates::View
Overview
A View is an HTML file, located at “#BASE_PATH/app/views/view.html.haml”.
The source template for new view files is located at “generator/templates/view.html.haml”.
ERB is also supported, but is not recommended.
Instance Attribute Summary
Attributes inherited from Base
#application_path, #template_path, #view
Instance Method Summary collapse
Methods inherited from Base
#append_to_file, #confirm_overwrite, #destination_path, #display_path, #generate, #initialize, #process_template, #processed_template, #source_path, #write_processed_template
Constructor Details
This class inherits a constructor from YMDP::Generator::Templates::Base
Instance Method Details
#destination_dir ⇒ Object
163 164 165 |
# File 'lib/view.rb', line 163 def destination_dir "#{application_path}/views" end |
#destination_filename ⇒ Object
159 160 161 |
# File 'lib/view.rb', line 159 def destination_filename "#{view}.html.haml" end |
#source_filename ⇒ Object
155 156 157 |
# File 'lib/view.rb', line 155 def source_filename "view.html.haml" end |