set accessors in the set_accessors! method

This commit is contained in:
Aaron Patterson 2013-10-27 14:31:49 -03:00
parent 41047172c3
commit b7ca9b52fe
2 changed files with 2 additions and 2 deletions

@ -96,11 +96,9 @@ def build(meth, *args)
end end
def create_root def create_root
self.destination_root = File.expand_path(app_path, destination_root)
valid_const? valid_const?
empty_directory '.' empty_directory '.'
set_default_accessors!
FileUtils.cd(destination_root) unless options[:pretend] FileUtils.cd(destination_root) unless options[:pretend]
end end
@ -111,6 +109,7 @@ def apply_rails_template
end end
def set_default_accessors! def set_default_accessors!
self.destination_root = File.expand_path(app_path, destination_root)
self.rails_template = case options[:template] self.rails_template = case options[:template]
when /^https?:\/\// when /^https?:\/\//
options[:template] options[:template]

@ -162,6 +162,7 @@ def initialize(*args)
end end
end end
public_task :set_default_accessors!
public_task :create_root public_task :create_root
def create_root_files def create_root_files