Class: Ella::ViewGenerator

Inherits:
Generator show all
Defined in:
lib/ella/generator/view_generator.rb

Overview

Generates views for Ella projects.

Instance Method Summary collapse

Methods inherited from Generator

#initialize

Constructor Details

This class inherits a constructor from Ella::Generator

Instance Method Details

#runObject



6
7
8
9
10
11
12
13
# File 'lib/ella/generator/view_generator.rb', line 6

def run
  Ella.find_root
  make_directory
  @path = "views/#{target_name}#{target_name ? '/' : ''}"
  create_subdirectory if target_name && !Dir.exist?(@path)
  create_files
  copy_templates
end