Method: Transender::Ji#backdrop

Defined in:
lib/transender.rb

#backdropObject

backdrop and dropback are used inconjunction, to form a form of mending the code back into the project, while maintaining transendability with the mothers source saves Clasess, Artwork, Transends and Views to abowl this will later be copied back to the project



176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/transender.rb', line 176

def backdrop
  #make sure there is abowl
  make_abowl unless read_abowl 

  #if the app is already there
  if File.exists?(app_path)

    # handle artwork if any
    files = Dir["#{app_path}/Artwork/*"]
    if files&&files.size>0
      #remove original artwork from abowl
      FileUtils.rm_rf "#{abowl_path}/Artwork"
      #copy this apps artworks to abowl
      FileUtils.cp_r "#{app_path}/Artwork", "#{abowl_path}/"
    end

    # handle transends if any
    files = Dir["#{app_path}/Transends/*"]
    if files&&files.size>0
      #remove original transends from abowl
      FileUtils.rm_rf "#{abowl_path}/Transends"
      #copy this bowls transends
      FileUtils.cp_r "#{app_path}/Transends", "#{abowl_path}/"
    end

    # handle classes&views file
    #FileUtils.rm_rf "#{abowl_path}/Classes"
    #FileUtils.rm_rf "#{abowl_path}/Views"

    if @abowl['files']
      dirz = @abowl['files'].keys
      dirz.each do |type|
        FileUtils.cp_r "#{app_path}/Classes/#{type}", "#{abowl_path}/Classes/" unless type == "Views"
      end
    end
    FileUtils.cp_r "#{app_path}/Views", "#{abowl_path}/"

  end

  #else do nothinf

end