Class: Batman::Generators::HtmlGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
Common
Defined in:
lib/generators/batman/html_generator.rb

Instance Method Summary collapse

Methods included from Common

included

Instance Method Details

#create_directoryObject



11
12
13
14
15
# File 'lib/generators/batman/html_generator.rb', line 11

def create_directory
  with_app_name do
    empty_directory "#{app_path}/html/#{plural_name.downcase}"
  end
end

#create_filesObject



17
18
19
20
21
22
23
# File 'lib/generators/batman/html_generator.rb', line 17

def create_files
  with_app_name do
    actions.each do |file|
      template "batman/html/#{file}.html", "#{app_path}/html/#{plural_name.downcase}/#{file}.html"
    end
  end
end