Method: Build::Text::Substitutions::NestedSubstitution#write_close

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

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



148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/build/text/substitutions.rb', line 148

def write_close(prefix, postfix, output, indentation)
  depth = @close.size
  indentation = indentation.with_prefix(prefix)

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