module XCAssets class Image attr_accessor :idiom attr_accessor :scale # The resource path # @return [Pathname] attr_reader :resource attr_reader :filename def initialize @idiom = 'universal' @scale = "2x" @resource = nil end def resource=(resource) @resource = resource @filename = @resource.basename.to_s end def contents hash = {} hash[:idiom] = idiom if idiom hash[:scale] = scale if scale hash[:filename] = filename if filename hash end end end