class NewsletterGenerator

Public Instance Methods

create_newsletter_file() click to toggle source
# File lib/generators/newsletter_generator.rb, line 6
def create_newsletter_file
        template 'newsletter.rb', File.join('app/newsletters', class_path, "#{file_name}_newsletter.rb")
end
create_view_files() click to toggle source
# File lib/generators/newsletter_generator.rb, line 10
def create_view_files
        actions.each do |action|
                available_formats.each do |format|
                        template "action.#{format}.emv", File.join('app/views', class_path, "#{file_name}_newsletter", "#{action}.#{format}.emv")
                end                  
        end
end

Protected Instance Methods

available_formats() click to toggle source
# File lib/generators/newsletter_generator.rb, line 20
def available_formats
        %w(html text)
end