Class: Arethusa::CLI::Generator
- Inherits:
-
Subcommand
- Object
- Thor
- Subcommand
- Arethusa::CLI::Generator
- Includes:
- Thor::Actions
- Defined in:
- lib/arethusa/cli/generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Subcommand
Class Method Details
.source_root ⇒ Object
7 8 9 |
# File 'lib/arethusa/cli/generator.rb', line 7 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#plugin(name) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/arethusa/cli/generator.rb', line 18 def plugin(name) @name = name @namespace = [:namespace] create_directories create_files try('add to Gruntfile', :add_to_gruntfile) try('add module to index.html', :add_to_index) commit_changes if [:commit] puts say_status(:success, "Created #{namespaced_name}") #give_conf_instructions end |
#retriever(mod, name) ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/arethusa/cli/generator.rb', line 52 def retriever(mod, name) @module = mod @name = name create_retriever create_retriever_spec end |
#spec(name) ⇒ Object
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/arethusa/cli/generator.rb', line 40 def spec(name) @name = name @namespace = [:namespace] empty_directory(spec_dir) create_spec commit_changes if [:commit] say_status(:success, "Created spec file for #{namespaced_name}") end |