Return answer data for all hosts.

 @return [Hash] A hash (keyed from hosts) containing hashes of answer file
   data.
503296
def generate_answers
      the_answers = {}
      dashboard = only_host_with_role(@hosts, 'dashboard')
      master = only_host_with_role(@hosts, 'master')
      @hosts.each do |h|
        the_answers[h.name] = host_answers(h, master, dashboard, @options)
        if the_answers[h.name] && h[:custom_answers]
          the_answers[h.name] = the_answers[h.name].merge(h[:custom_answers])
        end
        h[:answers] = the_answers[h.name]
      end
      return the_answers
    end
1245168
def headers
      list = @response.header_str.split(/[\r\n]+/).map(&:strip)
      Hash[list.flat_map{ |s| s.scan(/^(\S+): (.+)/) }.map { |pair|
        [pair.first.to_s.camelcase, pair.second]
      }]
    end
721425
def data
      @data ||= begin
        list = @xml.find('/e:epp/e:response/e:resData/node()').reject { |n| n.empty? }
        list.size > 1 ? list : list[0]
      end
    end
979079
def to_hash
      {
        'url'              => url,
        'scheme'           => scheme,
        'host'             => host,
        'root_url'         => root_url,
        'title'            => title,
        'best_title'       => best_title,
        'author'           => author,
        'best_author'      => best_author,
        'description'      => description,
        'best_description' => best_description,
        'links'            => links.to_hash,
        'images'           => images.to_a,
        'charset'          => charset,
        'feed'             => feed,
        'content_type'     => content_type,
        'meta_tags'        => meta_tags,
        'favicon'          => images.favicon,
        'response'         => { 'status'  => response.status,
                                'headers' => response.headers }
      }
    end
1119353
def each
      @data.each do |section, hash|
        hash.each do |key, value|
          yield [section, key, value]
        end
      end
    end
1131967
def get_answer_ids(self):
        
        id_list = []
        for answer in self.get_answers():
            id_list.append(answer.get_id())
        return IdList(id_list)
1069803
def get():
    
    livestatus = mk_livestatus()
    hosts = livestatus.get_hosts()
    services = livestatus.get_services()
    result = {}
    result['hosts'] = hosts
    result['services'] = services
    return result
699051
def data!
      result = {}
      @data.each_pair do |key, value|
        result[key] = value.is_a?(self.class) ? value.data! : value
      end
      result
    end
1109115
def _convert_dns_answer(cls, answer: dns.resolver.Answer) \
            -> Iterable[AddressInfo]:
        ''''''
        assert answer.rdtype in (dns.rdatatype.A, dns.rdatatype.AAAA)

        if answer.rdtype == dns.rdatatype.A:
            family = socket.AF_INET
        else:
            family = socket.AF_INET6

        for record in answer:
            ip_address = record.to_text()

            if family == socket.AF_INET6:
                flow_info, control_id = cls._get_ipv6_info(ip_address)
            else:
                flow_info = control_id = None

            yield AddressInfo(ip_address, family, flow_info, control_id)
548107
def get_answer(doc, mod='')
      result = []
      # The path seems to be weird, because the namespaces change incrementally
      # in the output, so I don't want to treat it here.
      # A modifier needed because synonyms service provides duplicate values.
      XPath.each(doc, "//result/*/*#{mod}") do |el|
        warn(el.text) if $DEBUG
        result << el.text
      end

      result.any? ? result : nil
    end
667461
def all(self):
        

        response = self._get_json(HTTPMethods.GET, self.saved_query_url, self._get_master_key())

        return response
497202
def get_hosts_info(self):
        
        result = []
        index = 0
        while index < self.host_numbers:
            host = self.get_generic_host_entry(index)
            result.append({
                'ip': host['NewIPAddress'],
                'name': host['NewHostName'],
                'mac': host['NewMACAddress'],
                'status': host['NewActive']})
            index += 1
        return result
76246
def all(self):
        
        url = self.bitbucket.url('GET_SSH_KEYS')
        return self.bitbucket.dispatch('GET', url, auth=self.bitbucket.auth)
102006
def to_hash
      {
        :repository   => repository.name,
        :model        => model.name,
        :fields       => fields,
        :links        => links,
        :conditions   => conditions,
        :offset       => offset,
        :limit        => limit,
        :order        => order,
        :unique       => unique?,
        :add_reversed => add_reversed?,
        :reload       => reload?,
      }
    end
118258
def get_csv(*args)
      payload = get!(*args)

      if payload.response.code != '200'
        raise BadResponse, "#{payload.response.code} #{payload.response.msg}"
      end

      response = payload.parsed_response

      unless response.is_a? Hash
        raise BadResponse, "Cannot parse response"
      end
      
      data = csv_node response

      header = data.first.keys
      result = CSV.generate do |csv|
        csv << header
        data.each { |row| csv << row.values }
      end

      result
    end
1015838
function getReadMeMetaFile(answers) {
    const content = format(`
        # Rung ─ ${answers.title}

        # Development

        - Use \`yarn\` to install the dependencies
        - Use \`rung run\` to start the CLI wizard
    `);

    return { filename: path.join(answers.name, 'README.md'), content };
}
1233272
def uri_from_rubygems
      return unless source.remotes.map(&:host).include?('rubygems.org')

      response = query_rubygems
      return unless response

      response[GEM_HOMEPAGES.find { |key| response[key] && !response[key].empty? }]
    end