Sha256: 14a569571273645f1068f784654a9c8eb41919e7f0950875bf6d4080665c2b5d

Contents?: true

Size: 500 Bytes

Versions: 10

Compression:

Stored size: 500 Bytes

Contents

module TrackerApi
  module Endpoints
    class Attachments
      attr_accessor :client

      def initialize(client)
        @client = client
      end


      def create(comment, files)
        return [] if files.to_a.empty?
        #Check files before upload to make it all or none.
        FileUtility.check_files_exist(files)
        attachment = Endpoints::Attachment.new(client)
        files.map do | file |
          attachment.create(comment, file)
        end  
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tracker_api-1.16.0 lib/tracker_api/endpoints/attachments.rb
tracker_api-1.15.0 lib/tracker_api/endpoints/attachments.rb
tracker_api-1.14.0 lib/tracker_api/endpoints/attachments.rb
tracker_api-1.13.0 lib/tracker_api/endpoints/attachments.rb
tracker_api-1.12.0 lib/tracker_api/endpoints/attachments.rb
tracker_api-1.11.0 lib/tracker_api/endpoints/attachments.rb
tracker_api-1.10.0 lib/tracker_api/endpoints/attachments.rb
tracker_api-1.9.1 lib/tracker_api/endpoints/attachments.rb
tracker_api-1.9.0 lib/tracker_api/endpoints/attachments.rb
tracker_api-1.8.0 lib/tracker_api/endpoints/attachments.rb