Created
November 8, 2017 14:07
-
-
Save PavelPenkov/85ed89acb6bcbf7d91ca717c31712510 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Workflow | |
attr_accessor :name, :inputs | |
def to_s | |
"workflow #{name} {\n".tap do |result| | |
inputs.each do |input| | |
result << "#{input.to_s}\n" | |
end | |
result << "}" | |
end | |
end | |
end | |
class FileInput | |
attr_accessor :name | |
def to_s | |
"File #{name}" | |
end | |
end | |
wdl = Workflow.new | |
wdl.name = 'hello' | |
file = FileInput.new | |
file.name = 'myfile' | |
wdl.inputs = [file] | |
wdl.to_s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment