def build(logger = Logger.new(StringIO.new))
      # If already built, don't build again
      return if @built
      @built = true

      # The resource hash is computed the first time it's needed. For now initialize it as nil.
      @resource_hash = nil

      # Invoke the backend's build method, if there is one. There's a stub below in case there's not.
      logger.debug "Calling build for object #{self.class}"
      build_catalog(logger)

      # Perform post-generation processing of the catalog
      return unless valid?

      validate_references
      return unless valid?

      convert_file_resources if @options[:compare_file_text]

      true
    end
def build(logger = Logger.new(StringIO.new))
      # If already built, don't build again
      return if @built
      @built = true

      # The resource hash is computed the first time it's needed. For now initialize it as nil.
      @resource_hash = nil

      # Invoke the backend's build method, if there is one. There's a stub below in case there's not.
      logger.debug "Calling build for object #{self.class}"
      build_catalog(logger)

      # Perform post-generation processing of the catalog
      return unless valid?

      validate_references
      return unless valid?

      convert_file_resources if @options[:compare_file_text]

      true
    end
Build catalog - this method needs to be called to build the catalog. It is separate due to
 the serialization of the logger object -- the parallel gem cannot serialize/deserialize a logger
 object so it cannot be part of any object that is passed around.
 @param logger [Logger] Logger object, initialized to a default throwaway value