Module: Locomotive::Wagon::Generators::Site
- Defined in:
- lib/locomotive/wagon/generators/site.rb,
lib/locomotive/wagon/generators/site/base.rb,
lib/locomotive/wagon/generators/site/blank.rb,
lib/locomotive/wagon/generators/site/cloned.rb
Defined Under Namespace
Classes: Base, Blank, Cloned, List
Class Method Summary collapse
-
.empty? ⇒ Boolean
Tell if the list of generators is empty or not .
-
.get(name) ⇒ Object
Return the information about a generator from its name.
-
.list ⇒ Array
List all the generators.
-
.list_to_json ⇒ String
JSON output of the generators list.
-
.register(name, klass, description = nil) ⇒ Boolean
Register a generator by adding it to the list of existing generators.
Class Method Details
.empty? ⇒ Boolean
Tell if the list of generators is empty or not .
52 53 54 |
# File 'lib/locomotive/wagon/generators/site.rb', line 52 def self.empty? Locomotive::Wagon::Generators::Site::List.instance._list.empty? end |
.get(name) ⇒ Object
Return the information about a generator from its name.
28 29 30 |
# File 'lib/locomotive/wagon/generators/site.rb', line 28 def self.get(name) Locomotive::Wagon::Generators::Site::List.instance.get(name) end |
.list ⇒ Array
List all the generators
36 37 38 |
# File 'lib/locomotive/wagon/generators/site.rb', line 36 def self.list Locomotive::Wagon::Generators::Site::List.instance._list end |
.list_to_json ⇒ String
JSON output of the generators list
44 45 46 |
# File 'lib/locomotive/wagon/generators/site.rb', line 44 def self.list_to_json Locomotive::Wagon::Generators::Site::List.instance.to_json end |
.register(name, klass, description = nil) ⇒ Boolean
Register a generator by adding it to the list of existing generators.
18 19 20 |
# File 'lib/locomotive/wagon/generators/site.rb', line 18 def self.register(name, klass, description = nil) Locomotive::Wagon::Generators::Site::List.instance.register(name, klass, description) end |