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, line 145 def baclava? @run.baclava_input? 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, line 134 def file=(filename) return unless @run.initialized? @value = nil @file = filename @remote_file = false 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, line 102 def file? !@file.nil? 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, line 121 def remote_file=(filename) return unless @run.initialized? @value = nil @file = filename @remote_file = true 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, line 111 def remote_file? file? && @remote_file end
Has this port been set?
# File lib/t2-server/port.rb, line 153 def set? !value.nil? || file? || baclava? 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, line 90 def value=(value) return unless @run.initialized? @file = nil @remote_file = false @value = value end