class Bolt::Project
Public Class Methods
new()
click to toggle source
# File lib/bolt/project.rb, line 14 def initialize @default_directories = [$config.pages, $config.views, $config.lib, $config.resources] @default_files = {$config.config => "default_files/config.yml", "#{$config.views}/application.haml" => "default_files/application.haml", "#{$config.views}/home.haml" => "default_files/home.haml", "#{$config.pages}/home.rb" => "default_files/home.rb"} end
Public Instance Methods
Private Instance Methods
create_directory_structure()
click to toggle source
Creates all the default directories using either defaults specified in lib/bolt.rb or by options on the command line
# File lib/bolt/project.rb, line 28 def create_directory_structure create_directory($config.base_dir, :base_dir => true) unless File.directory?($config.base_dir) @default_directories.each {|directory| create_directory(directory)} end
create_files()
click to toggle source
Creates all the default files using either defaults specified in lib/bolt.rb or by options on the command line
# File lib/bolt/project.rb, line 35 def create_files @default_files.each {|file, template| create_file(file, :copy_from => $BOLT_BASE + template)} end