Class: Stall::ViewGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/stall/view/view_generator.rb

Defined Under Namespace

Classes: ViewTemplate

Constant Summary collapse

VIEWS_DIR =
File.expand_path('../../../../../app/views', __FILE__)

Instance Method Summary collapse

Instance Method Details

#copy_view_templateObject



8
9
10
11
12
13
14
# File 'lib/generators/stall/view/view_generator.rb', line 8

def copy_view_template
  paths = file_paths.map { |file_path| ViewTemplate.new(file_path) }

  paths.each do |view_template|
    template(view_template.source_path, view_template.target_path)
  end
end