Class: Cardio::Generators::ModGenerator

Inherits:
ModBase
  • Object
show all
Defined in:
card/lib/generators/mod/mod_generator.rb

Overview

generate mod with standard directories

Instance Method Summary collapse

Methods inherited from ModBase

#mod_path

Methods included from ClassMethods

#banner, #banner_command, #namespace, #source_root

Instance Method Details

#create_modObject



7
8
9
10
11
12
13
14
15
16
# File 'card/lib/generators/mod/mod_generator.rb', line 7

def create_mod
  inside mod_path do
    assets_dir
    init_dir
    set_dir
    spec_dir
    empty_directory "public"
    empty_directory "locales"
  end
end

#root_filesObject



18
19
20
# File 'card/lib/generators/mod/mod_generator.rb', line 18

def root_files
  template "README.md.erb", "#{mod_path}/README.md"
end