class DockerfileAst::Writer
Public Class Methods
new(tree)
click to toggle source
# File lib/dockerfile_ast/writer.rb, line 3 def initialize(tree) @tree = tree end
Public Instance Methods
write(return_type = :string)
click to toggle source
# File lib/dockerfile_ast/writer.rb, line 7 def write(return_type = :string) if return_type == :tree return @tree elsif return_type == :array return @tree.to_array else return @tree.to_s end end