Sha256: da0d7d9e3582878a5ab39ebecae68c68a1c482f31cd05ab172bbba549828f1d8
Contents?: true
Size: 744 Bytes
Versions: 12
Compression:
Stored size: 744 Bytes
Contents
# Generates a new section. class SectionGenerator < Rails::Generators::Base argument :name, :type => :string def parse_arguments @section = SectionsRails::Section.new name end def create_folder empty_directory @section.folder_filepath end def create_partial create_file "#{@section.partial_filepath}.html.haml", ".#{@section.filename}\n -# DOM content goes here.\n" end def create_coffee_file create_file "#{@section.asset_filepath}.coffee", "class #{@section.filename}\n # Your CoffeeScript code goes here.\n" end def create_sass_file create_file "#{@section.asset_filepath}.sass", ".#{@section.filename}\n /* Your SASS goes here. */\n" end end
Version data entries
12 entries across 12 versions & 1 rubygems