Get an array of inspected fields for the document.

 @api private

 @example Inspect the defined fields.
   document.inspect_fields

 @return [ String ] An array of pretty printed field values.

 @since 1.0.0
765377
def inspect_fields
      fields.map do |name, field|
        unless name == "_id"
          as = field.options[:as]
          "#{name}#{as ? "(#{as})" : nil}: #{@attributes[name].inspect}"
        end
      end.compact
    end
157061
def determine_stored_fields(options = {})
      stored_fields = options[:lazy]
      if stored_fields && !(Array === stored_fields)
        stored_fields = index_definition[:ferret_fields].select { |field, config| config[:store] == :yes }.map(&:first)
      end
      logger.debug "stored_fields: #{stored_fields.inspect}"
      return stored_fields
    end
1183266
def fields(opts={})
      bypass_cache = opts.delete(:bypass_cache) { false }
      field_name = opts.delete(:only) { nil }

      if field_name
        field_name = field_name.to_s
        if bypass_cache || @fields.nil? || @fields.empty?
          response = Hubspot::Connection.get_json(FIELD_PATH, { form_guid: @guid, field_name: field_name })
          response
        else
          @fields.detect { |f| f['name'] == field_name }
        end
      else
        if bypass_cache || @fields.nil? || @fields.empty?
          response = Hubspot::Connection.get_json(FIELDS_PATH, { form_guid: @guid })
          @fields = response
        end
        @fields
      end
    end
228473
def getFieldDataPrintableValue(fid)
      printable = nil
      if @field_data_list
         field_data = lookupFieldData(fid)
         if field_data
            printableElement = field_data.elements[ "printable" ]
            printable = printableElement.text if printableElement and printableElement.has_text?
         end   
      end
      printable
    end
1068696
def fields(self):
        
        process_markdown = ("fields" in self._raw.get("mrkdwn_in", []))
        fields = self._raw.get("fields", [])
        if fields:
            logging.debug("Rendering with markdown markdown %s for %s", process_markdown, fields)
        return [
            {"title": e["title"], "short": e["short"], "value": self._formatter.render_text(e["value"], process_markdown)}
            for e in fields
        ]
1285574
def inspect
      # We check defined?(@attributes) not to issue warnings if the object is
      # allocated but not initialized.
      inspection = if defined?(@attributes) && @attributes
        self.class.attribute_names.collect do |name|
          if has_attribute?(name)
            attr = _read_attribute(name)
            value = if attr.nil?
              attr.inspect
            else
              attr = format_for_inspect(attr)
              inspection_filter.filter_param(name, attr)
            end
            "#{name}: #{value}"
          end
        end.compact.join(", ")
      else
        "not initialized"
      end

      "#<#{self.class} #{inspection}>"
    end
200875
def awesome_mongoid_document(object)
      return object.inspect if !defined?(::ActiveSupport::OrderedHash)

      data = (object.attributes || {}).sort_by { |key| key }.inject(::ActiveSupport::OrderedHash.new) do |hash, c|
        hash[c[0].to_sym] = c[1]
        hash
      end
      data = { errors: object.errors, attributes: data } if !object.errors.empty?
      "#{object} #{awesome_hash(data)}"
    end
377
def inspect
      ['{config', *each.map{|key, value| " "+qualified_key(*key)+" => "+value.inspect },'}'].join("\n")
    end
200151
def _get_field_doc(self, field):
        
        fieldspec = dict()
        fieldspec['type'] = field.__class__.__name__
        fieldspec['required'] = field.required
        fieldspec['validators'] = [{validator.__class__.__name__: validator.__dict__} for validator in field.validators]
        return fieldspec
1067047
def selected_fields
      return @selected_fields unless @selected_fields.nil?

      fields = [*options[:select]].map { |f| f.split(',') }.flatten
      fields.concat(required_fields) if @fasta && !fields.empty?
      @selected_fields = fields.map { |f| glob_to_regex(f) }
    end
45411
def fields(self):
        
        result = self._get_key_values('fields')
        for key, value in result.items():
            if not isinstance(value, list):
                result[key] = [value]

        for key, value in result.items():
            schema = get_schema_from_type(key)
            for obj in value:
                if obj not in schema._declared_fields:
                    raise InvalidField("{} has no attribute {}".format(schema.__name__, obj))

        return result
554687
def get_document_field(instance):
        
        for name, field in instance.searchindex.fields.items():
            if field.document is True:
                return name
592180
def _get_fields(attrs, field_class, pop=False, ordered=False):
    
    fields = [
        (field_name, field_value)
        for field_name, field_value in iteritems(attrs)
        if is_instance_or_subclass(field_value, field_class)
    ]
    if pop:
        for field_name, _ in fields:
            del attrs[field_name]
    if ordered:
        fields.sort(key=lambda pair: pair[1]._creation_index)
    return fields
361441
def find_field name
      return field[name] if field[name]
      @lines.each do | line |
        value = line.scan(/###{name}=(.*)/)
        if value[0]
          v = value[0][0]
          field[name] = v
          return v
        end
      end
      nil
    end
306455
def __list_fields(cls):
        
        for name in cls._doc_type.mapping:
            field = cls._doc_type.mapping[name]
            yield name, field, False

        if hasattr(cls.__class__, '_index'):
            if not cls._index._mapping:
                return
            for name in cls._index._mapping:
                # don't return fields that are in _doc_type
                if name in cls._doc_type.mapping:
                    continue
                field = cls._index._mapping[name]
                yield name, field, True
931016
def read(self):
        
        cursor = self.get_collection().find(
            {
                '_id': {'$in': self._document_ids},
                self._field: {'$exists': True}
            },
            {self._field: True}
        )

        return {doc['_id']: doc[self._field] for doc in cursor}
1029306
def view_properties_as_tree field=@form.get_current_field
    alert "Nil field" unless field
    return unless field
    text = []
    tree = {}
    #iv = field.instance_variables.map do |v| v.to_s; end
    field.instance_variables.each do |v|
      val = field.instance_variable_get(v)
      klass = val.class
      if val.is_a? Array 
        #tree[v.to_s] = val
        text << { v.to_s => val }
        val = val.size
      elsif val.is_a? Hash
        #tree[v.to_s] = val
        text << { v.to_s => val }
        if val.size <= 5
          val = val.keys
        else
          val = val.keys.size.to_s + " [" + val.keys.first(5).join(", ") + " ...]"
        end
      end
      case val
      when String, Integer, TrueClass, FalseClass, NilClass, Array, Hash, Symbol
        ;
      else
        val = "Not shown"
      end
      text << "%-20s  %10s  %s" % [v, klass, val]
    end
    tree["Instance Variables"] = text
    pm = field.public_methods(false).map do |v| v.to_s; end
    tree["Public Methods"] = pm
    pm = field.public_methods(true) - field.public_methods(false)
    pm = pm.map do |v| v.to_s; end
    tree["Inherited Methods"] = pm

    #$log.debug "  view_properties #{s.size} , #{s} "
    treedialog tree, :title => "Properties"
  end