Class: YMDP::Generator::Templates::Modifications

Inherits:
Base
  • Object
show all
Includes:
Snippets
Defined in:
lib/view.rb

Overview

Modifications cover anything that needs to be done to existing files when a new view is added.

Instance Attribute Summary

Attributes inherited from Base

#application_path, #template_path, #view

Instance Method Summary collapse

Methods included from Snippets

#launcher_method

Methods inherited from Base

#append_to_file, #confirm_overwrite, #destination_path, #display_path, #initialize, #process_template, #processed_template, #source_filename, #source_path, #write_processed_template

Constructor Details

This class inherits a constructor from YMDP::Generator::Templates::Base

Instance Method Details

#destination_dirObject



237
238
239
# File 'lib/view.rb', line 237

def destination_dir
  "#{application_path}/javascripts"
end

#destination_filenameObject



233
234
235
# File 'lib/view.rb', line 233

def destination_filename
  "launcher.js"
end

#generateObject



228
229
230
231
# File 'lib/view.rb', line 228

def generate
  content = launcher_method(view)
  append_to_file(destination_path, content)
end