class RailsCopier::Folder

Attributes

from[RW]
new_dir[RW]
new_name[RW]
to[RW]

Public Class Methods

create(from, to, new_name) click to toggle source
# File lib/rails_copier/folder.rb, line 5
def self.create(from, to, new_name)
  new(from, to, new_name).save
end
new(from, to, new_name) click to toggle source
# File lib/rails_copier/folder.rb, line 9
def initialize(from, to, new_name)
  @new_name = new_name
  @from     = from
  @to       = to
end

Public Instance Methods

path_to_secrets() click to toggle source
# File lib/rails_copier/folder.rb, line 20
def path_to_secrets
  "#{new_dir}/config/secrets.yml"
end
save() click to toggle source
# File lib/rails_copier/folder.rb, line 15
def save
  @new_dir = FileUtils::mkdir_p("#{to}/#{new_name.underscore}").join
  self
end