class Resources::AssetCatalogResource

Constants

IMAGE_SET_EXTENSION

Attributes

images[R]

Public Instance Methods

method_name(string) click to toggle source
# File lib/robjc/resources/asset_catalog_resource.rb, line 12
  def method_name(string)
  components = string.split('-')
  string = components.first.downcase
  if components.length == 1
    string
  else
    components.each_with_index do |s, i|
      next if i == 0
      string += s.capitalize
    end
  end
  string
end

Private Instance Methods

image_names() click to toggle source
# File lib/robjc/resources/asset_catalog_resource.rb, line 28
def image_names
  image_sets.map do |f|
    File.basename(f, ".#{IMAGE_SET_EXTENSION}")
  end
end
image_sets() click to toggle source
# File lib/robjc/resources/asset_catalog_resource.rb, line 34
def image_sets
  Dir.glob(File.join(path, "*.#{IMAGE_SET_EXTENSION}"))
end