def render(view_options=configuration)
      logger.debug "rendering"
      result = ""
      if template
        logger.debug "rendering with template : #{template}"
        view = AppView.new(items, view_options)
        view.template = template
        result = view.render
      else
        items.each_with_index do |item, index|
          result += "\n" unless index == 0
          result += item.name.green + ":\n"
          if item.respond_to?(:attributes)
            attributes = item.attributes.deep_clone
            result += attributes.recursively_stringify_keys!.to_conf.gsub(/\s+$/, '') # strip trailing whitespace from YAML
            result += "\n"
          end
        end
      end
      result
    end
def render(view_options=configuration)
      logger.debug "rendering"
      result = ""
      if template
        logger.debug "rendering with template : #{template}"
        view = AppView.new(items, view_options)
        view.template = template
        result = view.render
      else
        items.each_with_index do |item, index|
          result += "\n" unless index == 0
          result += item.name.green + ":\n"
          if item.respond_to?(:attributes)
            attributes = item.attributes.deep_clone
            result += attributes.recursively_stringify_keys!.to_conf.gsub(/\s+$/, '') # strip trailing whitespace from YAML
            result += "\n"
          end
        end
      end
      result
    end
Render items result to a string

 @return [String] suitable for displaying on STDOUT or writing to a file