Module: Appjam::Generators
- Defined in:
- lib/appjam.rb,
lib/appjam/generators/cli.rb,
lib/appjam/generators/jam.rb,
lib/appjam/generators/lib.rb,
lib/appjam/generators/gist.rb,
lib/appjam/generators/help.rb,
lib/appjam/generators/blank.rb,
lib/appjam/generators/search.rb,
lib/appjam/generators/actions.rb,
lib/appjam/generators/mvc_model.rb,
lib/appjam/generators/mvc_project.rb
Overview
This module it’s used for register generators
Defined Under Namespace
Modules: Actions Classes: AppRootNotFound, Blank, Cli, Gist, Help, Jam, Lib, MvcModel, MvcProject, Search
Constant Summary collapse
- DEV_PATH =
File.("../../", File.dirname(__FILE__))
Class Method Summary collapse
-
.add_generator(name, klass) ⇒ Object
Gloabl add a new generator class.
-
.load_components! ⇒ Object
Load Global Actions and Component Actions then all files in
load_path
. -
.load_paths ⇒ Object
Here we store our generators paths.
-
.mappings ⇒ Object
Return a ordered list of task with their class.
Class Method Details
.add_generator(name, klass) ⇒ Object
Gloabl add a new generator class
42 43 44 |
# File 'lib/appjam.rb', line 42 def add_generator(name, klass) mappings[name] = klass end |
.load_components! ⇒ Object
Load Global Actions and Component Actions then all files in load_path
.
49 50 51 52 |
# File 'lib/appjam.rb', line 49 def load_components! require 'appjam/generators/actions' load_paths.flatten.each { |file| require file } end |
.load_paths ⇒ Object
Here we store our generators paths
28 29 30 |
# File 'lib/appjam.rb', line 28 def load_paths @_files ||= [] end |
.mappings ⇒ Object
Return a ordered list of task with their class
35 36 37 |
# File 'lib/appjam.rb', line 35 def mappings @_mappings ||= ActiveSupport::OrderedHash.new end |