lib/jss/api_object/peripheral_type.rb
def order_fields
      @fields.compact!
      @fields.each_index{|i| @fields[i][:order] = i+1}
      @fields.unshift nil
    end
###
### Close up gaps in the field order, and make each field's :order match it's array index
###
Close up gaps in the field order, and make each field's :order match it's array index
Close up gaps in the field order and make each field ' s : order match it ' s array index
def order_fields
      @fields.compact!
      @fields.each_index{|i| @fields[i][:order] = i+1}
      @fields.unshift nil
    end
def order_fields @fields . compact! @fields . each_index { | i | @fields [ i ] [ :order ] = i + 1 } @fields . unshift nil end
Close up gaps in the field order, and make each field's :order match it's array index
Close up gaps in the field order and make each field ' s : order match it ' s array index