Class: Middleman::Templates::Local

Inherits:
Base
  • Object
show all
Defined in:
lib/middleman-core/templates/local.rb

Overview

Local templates

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

gemfile_template, #generate_bundler!, #generate_gitignore!, #generate_rack!, #initialize

Constructor Details

This class inherits a constructor from Middleman::Templates::Base

Class Method Details

.source_rootString

Look for templates in ~/.middleman

Returns:

  • (String)


5
6
7
# File 'lib/middleman-core/templates/local.rb', line 5

def self.source_root
  File.join(File.expand_path('~/'), '.middleman')
end

Instance Method Details

#build_scaffold!

This method returns an undefined value.

Just copy from the template path



11
12
13
# File 'lib/middleman-core/templates/local.rb', line 11

def build_scaffold!
  directory options[:template].to_s, location, force: options[:force], exclude_pattern: /\.git\/.*/
end