Method: Longbow.assets_file_path

Defined in:
lib/longbow/images.rb

.assets_file_path(directory) ⇒ Object



366
367
368
369
370
371
372
373
374
375
# File 'lib/longbow/images.rb', line 366

def self.assets_file_path directory
  asset_path = ''
  Dir.glob(directory + '/**/*/').each do |d|
    searching = 'Images.xcassets/'
    asset_path = d if d.slice(d.length - searching.length, searching.length) == searching
    break if asset_path.length > 0
  end

  return asset_path
end