Class: RailsCopier::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_copier/project.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from, to, new_name) ⇒ Project

Returns a new instance of Project.



10
11
12
# File 'lib/rails_copier/project.rb', line 10

def initialize(from, to, new_name)
  @folder  = Folder.create(from, to, new_name)
end

Class Method Details

.create(from, to, new_name) ⇒ Object



6
7
8
# File 'lib/rails_copier/project.rb', line 6

def self.create(from, to, new_name)
  new(from, to, new_name).save
end

Instance Method Details

#saveObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/rails_copier/project.rb', line 14

def save
  copy_entry
  replace_old_name_ocurrencies
  remove_git_repo
  remove_tmp
  replace_rails_secret
  touch_log_folder
  remove_database_yml
  self
end