Class: Services::MdsFileUploadContext

Inherits:
Object
  • Object
show all
Defined in:
app/contexts/services/mds_file_upload_context.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account, upload_user, uploaded_file, notify_uploader = false) ⇒ MdsFileUploadContext

Returns a new instance of MdsFileUploadContext.



11
12
13
14
15
16
17
18
# File 'app/contexts/services/mds_file_upload_context.rb', line 11

def initialize(, upload_user, uploaded_file, notify_uploader=false)
  @uploaded_file = uploaded_file
  @upload_user = upload_user
  @account = 
  @notify_uploader = notify_uploader

  self.extend SubmitMdsFileForProcessing
end

Instance Attribute Details

#accountObject (readonly)

Returns the value of attribute account.



5
6
7
# File 'app/contexts/services/mds_file_upload_context.rb', line 5

def 
  @account
end

#notify_uploaderObject (readonly)

Returns the value of attribute notify_uploader.



5
6
7
# File 'app/contexts/services/mds_file_upload_context.rb', line 5

def notify_uploader
  @notify_uploader
end

#upload_userObject (readonly)

Returns the value of attribute upload_user.



5
6
7
# File 'app/contexts/services/mds_file_upload_context.rb', line 5

def upload_user
  @upload_user
end

#uploaded_fileObject (readonly)

Returns the value of attribute uploaded_file.



5
6
7
# File 'app/contexts/services/mds_file_upload_context.rb', line 5

def uploaded_file
  @uploaded_file
end

Class Method Details

.call(account, upload_user, uploaded_file, notify_uploader = false) ⇒ Object



7
8
9
# File 'app/contexts/services/mds_file_upload_context.rb', line 7

def self.call(, upload_user, uploaded_file, notify_uploader=false)
  MdsFileUploadContext.new(, upload_user, uploaded_file, notify_uploader).call
end

Instance Method Details

#callObject



20
21
22
# File 'app/contexts/services/mds_file_upload_context.rb', line 20

def call
  self.submit_uploaded_file 
end