Module: Candle::Generators
- Defined in:
- lib/candle.rb,
lib/candle/generators/cli.rb,
lib/candle/generators/jam.rb,
lib/candle/generators/map.rb,
lib/candle/generators/xib.rb,
lib/candle/generators/help.rb,
lib/candle/generators/blank.rb,
lib/candle/generators/table.rb,
lib/candle/generators/actions.rb
Overview
This module it’s used for register generators
Defined Under Namespace
Modules: Actions Classes: AppRootNotFound, Blank, Cli, Help, Jam, Map, Table, 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
47 48 49 |
# File 'lib/candle.rb', line 47 def add_generator(name, klass) mappings[name] = klass end |
.load_components! ⇒ Object
Load Global Actions and Component Actions then all files in load_path
.
54 55 56 57 |
# File 'lib/candle.rb', line 54 def load_components! require 'candle/generators/actions' load_paths.flatten.each { |file| require file } end |
.load_paths ⇒ Object
Here we store our generators paths
33 34 35 |
# File 'lib/candle.rb', line 33 def load_paths @_files ||= [] end |
.mappings ⇒ Object
Return a ordered list of task with their class
40 41 42 |
# File 'lib/candle.rb', line 40 def mappings @_mappings ||= ActiveSupport::OrderedHash.new end |