You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: host_build_status.rb
    path of file: ./repos/foreman/app/services
    
    the code of the file until where you have to start completion: class HostBuildStatus
  attr_reader :host, :state, :errors
  delegate :available_template_
    
  def host_status
    return if host.valid?
    host.errors.full_messages.each do |error|
      fail!(:host, error.to_s, host.to_param)
    end
  rescue => error
    fail!(:host, _('Failed to validate %{host}: %{error}') % {:host => host, :error => error.to_s}, host.to_param)
  end