Method: Build::Text::Substitutions::NestedSubstitution#write_open

Defined in:
lib/build/text/substitutions.rb

#write_open(prefix, postfix, output, indentation) ⇒ Object



134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/build/text/substitutions.rb', line 134

def write_open(prefix, postfix, output, indentation)
  depth = @open.size
  indentation = indentation.with_prefix(prefix)

  #output.write(prefix)
  (0...depth).each do |i|
    chunk = @open[i]
    chunk.chomp! if i == depth-1
    
    output.write(indentation.by(i) << chunk)
  end
  output.write(postfix)
end