Class: Greg::FileTemplate
Instance Method Summary
collapse
#app_class_name, #app_name
Instance Method Details
#create! ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/greg/templates/file_template.rb', line 7
def create!
Greg.generator.inside_dir do
current_file = Pathname(destination).expand_path
current_file.dirname.mkdir unless current_file.dirname.exist?
current_file.write(contents)
end
end
|
#msg ⇒ Object
15
16
17
|
# File 'lib/greg/templates/file_template.rb', line 15
def msg
" [create] #{destination}"
end
|