def as_strings(self):
        """Return the entire Container as nginx config strings."""
        ret = []
        container_title = (INDENT * self._depth)
        container_title += '{0}{1} {{\n'.format(
            self.name, (' {0}'.format(self.value) if self.value else '')
        )
        ret.append(container_title)
        for x in self.children:
            if isinstance(x, Key):
                ret.append(INDENT + x.as_strings)
            elif isinstance(x, Comment):
                if x.inline and len(ret) >= 1:
                    ret[-1] = ret[-1].rstrip('\n') + '  ' + x.as_strings
                else:
                    ret.append(INDENT + x.as_strings)
            elif isinstance(x, Container):
                y = x.as_strings
                ret.append('\n' + y[0])
                for z in y[1:]:
                    ret.append(INDENT + z)
            else:
                y = x.as_strings
                ret.append(INDENT + y)
        ret[-1] = re.sub('}\n+$', '}\n', ret[-1])
        ret.append('}\n\n')
        return ret
def as_strings ( self ) : ret = [ ] container_title = ( INDENT * self . _depth ) container_title += '{0}{1} {{\n' . format ( self . name , ( ' {0}' . format ( self . value ) if self . value else '' ) ) ret . append ( container_title ) for x in self . children : if isinstance ( x , Key ) : ret . append ( INDENT + x . as_strings ) elif isinstance ( x , Comment ) : if x . inline and len ( ret ) >= 1 : ret [ - 1 ] = ret [ - 1 ] . rstrip ( '\n' ) + '  ' + x . as_strings else : ret . append ( INDENT + x . as_strings ) elif isinstance ( x , Container ) : y = x . as_strings ret . append ( '\n' + y [ 0 ] ) for z in y [ 1 : ] : ret . append ( INDENT + z ) else : y = x . as_strings ret . append ( INDENT + y ) ret [ - 1 ] = re . sub ( '}\n+$' , '}\n' , ret [ - 1 ] ) ret . append ( '}\n\n' ) return ret
Return the entire Container as nginx config strings.