11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/generators/tableficate/theme/theme_generator.rb', line 11
def create_theme
empty_directory(VIEW_PATH)
if partial
if partial =~ /\//
partial =~ /^(.*)\/(.*)$/
= $1
partial_name = $2
empty_directory("#{VIEW_PATH}/#{file_name}/#{}")
copy_file("#{}/_#{partial_name}.html.erb", "#{VIEW_PATH}/#{file_name}/#{}/_#{partial_name}.html.erb")
else
copy_file("_#{partial}.html.erb", "#{VIEW_PATH}/#{file_name}/_#{partial}.html.erb")
end
else
directory('', "#{VIEW_PATH}/#{file_name}")
end
end
|