lib/asana/resource_includes/attachment_uploading.rb in asana-2.0.1 vs lib/asana/resource_includes/attachment_uploading.rb in asana-2.0.2

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'faraday/multipart' module Asana module Resources # Internal: Mixin to add the ability to upload an attachment to a specific @@ -11,12 +13,10 @@ # mime - [String] the MIME type of the file # io - [IO] an object which returns the file's content on +#read+, e.g. a +::StringIO+ # options - [Hash] the request I/O options # data - [Hash] extra attributes to post # - # rubocop:disable Metrics/AbcSize - # rubocop:disable Metrics/MethodLength def attach(filename: required('filename'), mime: required('mime'), io: nil, options: {}, **data) upload = if io.nil? @@ -33,10 +33,8 @@ upload: upload, options: options) Attachment.new(parse(response).first, client: client) end - # rubocop:enable Metrics/MethodLength - # rubocop:enable Metrics/AbcSize end end end