class T2Server::InputPort
Represents an input to a workflow.
Attributes
If set, the file which has been used to supply this port's data.
If set, the value held by this port. Could be a list (of lists (etc)).
Public Instance Methods
Has this port been set via a baclava document?
# File lib/t2-server/port.rb 145 def baclava? 146 @run.baclava_input? 147 end
Set the file to use for this port's data. The file will be uploaded to the server before the run starts. This has no effect if the run is already running or finished.
# File lib/t2-server/port.rb 134 def file=(filename) 135 return unless @run.initialized? 136 @value = nil 137 @file = filename 138 @remote_file = false 139 end
Is this port's data being supplied by a file? The file could be local or remote (already on the server) for this to return true.
# File lib/t2-server/port.rb 102 def file? 103 !@file.nil? 104 end
Set the remote file to use for this port's data. The file must already be on the server. This has no effect if the run is already running or finished.
# File lib/t2-server/port.rb 121 def remote_file=(filename) 122 return unless @run.initialized? 123 @value = nil 124 @file = filename 125 @remote_file = true 126 end
Is this port's data being supplied by a remote (one that is already on the server) file?
# File lib/t2-server/port.rb 111 def remote_file? 112 file? && @remote_file 113 end
Has this port been set?
# File lib/t2-server/port.rb 153 def set? 154 !value.nil? || file? || baclava? 155 end
Set the value of this input port. This has no effect if the run is already running or finished.
# File lib/t2-server/port.rb 90 def value=(value) 91 return unless @run.initialized? 92 @file = nil 93 @remote_file = false 94 @value = value 95 end