def create_asset *args, &block
      file_name = asset_file_name(args)
      dir = File.dirname(file_name)
      FileUtils.mkdir_p dir if !File.directory?(dir)

      content = get_asset_content(args) || yield if block

      # abort if no content given
      debug "Warning: Content must be passed in either as a :content hash or a block" if !content
      return nil if !content

      debug "Writing asset file: #{file_name}"
      # write file content of asset
      File.open(file_name, 'w') do |f|
        f.puts content
      end
    end
def create_asset *args, &block
      file_name = asset_file_name(args)
      dir = File.dirname(file_name)
      FileUtils.mkdir_p dir if !File.directory?(dir)

      content = get_asset_content(args) || yield if block

      # abort if no content given
      debug "Warning: Content must be passed in either as a :content hash or a block" if !content
      return nil if !content

      debug "Writing asset file: #{file_name}"
      # write file content of asset
      File.open(file_name, 'w') do |f|
        f.puts content
      end
    end
CREATE