Module: Puer::Generators
- Defined in:
- lib/puer.rb,
lib/puer/generators/cli.rb,
lib/puer/generators/jam.rb,
lib/puer/generators/xib.rb,
lib/puer/generators/gist.rb,
lib/puer/generators/help.rb,
lib/puer/generators/model.rb,
lib/puer/generators/search.rb,
lib/puer/generators/actions.rb,
lib/puer/generators/controller.rb
Overview
This module it’s used for register generators
Defined Under Namespace
Modules: Actions Classes: AppRootNotFound, Cli, Controller, Gist, Help, Jam, Model, Search, Xib
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
49 50 51 |
# File 'lib/puer.rb', line 49 def add_generator(name, klass) mappings[name] = klass end |
.load_components! ⇒ Object
Load Global Actions and Component Actions then all files in load_path
.
56 57 58 59 |
# File 'lib/puer.rb', line 56 def load_components! require 'puer/generators/actions' load_paths.flatten.each { |file| require file } end |
.load_paths ⇒ Object
Here we store our generators paths
35 36 37 |
# File 'lib/puer.rb', line 35 def load_paths @_files ||= [] end |
.mappings ⇒ Object
Return a ordered list of task with their class
42 43 44 |
# File 'lib/puer.rb', line 42 def mappings @_mappings ||= ActiveSupport::OrderedHash.new end |