lib/core/core_setup_init.rb
# Internal setup function to re-organize thanks to :ask_sort
Internal setup function to re-organize thanks to :ask_sort
Internal setup function to re - organize thanks to : ask_sort
def _setup_reorganize_so_sort(attr_group)
      attr_subgroups = []
      attr_noorder = []
      attr_group.each do |attr|
        attr_def = attr[attr.keys[0]]
        if attr_def[:ask_sort].is_a?(Fixnum)
          Lorj.debug(4, "'%s' position requested is '%s'",
                     attr.key(attr_def), attr_def[:ask_sort])
          if attr_subgroups[attr_def[:ask_sort]].nil?
            attr_subgroups[attr_def[:ask_sort]] = [attr]
          else
            attr_subgroups[attr_def[:ask_sort]] << attr
          end
        else
          attr_noorder << attr
        end
      end
      attr_subgroups.flatten!
      attr_subgroups + attr_noorder
    end
def _setup_reorganize_so_sort ( attr_group ) attr_subgroups = [ ] attr_noorder = [ ] attr_group . each do | attr | attr_def = attr [ attr . keys [ 0 ] ] if attr_def [ :ask_sort ] . is_a? ( Fixnum ) Lorj . debug ( 4 , "'%s' position requested is '%s'" , attr . key ( attr_def ) , attr_def [ :ask_sort ] ) if attr_subgroups [ attr_def [ :ask_sort ] ] . nil? attr_subgroups [ attr_def [ :ask_sort ] ] = [ attr ] else attr_subgroups [ attr_def [ :ask_sort ] ] << attr end else attr_noorder << attr end end attr_subgroups . flatten! attr_subgroups + attr_noorder end
Internal setup function to re-organize thanks to :ask_sort
Internal setup function to re - organize thanks to : ask_sort
attr_group
<not_specific>