Class: HtmlMockup::Generators::GeneratorGenerator
- Inherits:
-
Base
- Object
- Thor::Group
- Cli::Command
- Base
- HtmlMockup::Generators::GeneratorGenerator
- Includes:
- Thor::Actions
- Defined in:
- lib/html_mockup/generators/generator.rb
Class Method Summary collapse
-
.source_root ⇒ Object
class_option :template, :type => :string, :aliases => [“-t”], :desc => “Template to use, can be a path or a git repository remote, uses built in minimal as default”.
Instance Method Summary collapse
Methods inherited from Base
Methods inherited from Cli::Command
Class Method Details
.source_root ⇒ Object
class_option :template, :type => :string, :aliases => [“-t”], :desc => “Template to use, can be a path or a git repository remote, uses built in minimal as default”
10 11 12 |
# File 'lib/html_mockup/generators/generator.rb', line 10 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#create_lib_file ⇒ Object
14 15 16 17 18 |
# File 'lib/html_mockup/generators/generator.rb', line 14 def create_lib_file destination = "#{path}/#{name}_generator.rb" template('templates/generator.tt', destination) say "Add `require #{destination}` to your mockup file and run mockup generate #{name}." end |