Sha256: df7b61e8f2ee04534c3b5e95acd6656d1523de79b3e1e0c5b25d8ab362894b5e

Contents?: true

Size: 494 Bytes

Versions: 20

Compression:

Stored size: 494 Bytes

Contents

module ProMotion
  module Table
    module Utils
      def index_path_to_section_index(params)
        if params.is_a?(Hash) && params[:index_path]
          params[:section] = params[:index_path].section
          params[:index] = params[:index_path].row
        end
        params
      end

      # Determines if all members of an array are a certain class
      def array_all_members_of?(arr, klass)
        arr.select{ |e| e.is_a?(klass) }.length == arr.length
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ProMotion-3.0.0 lib/ProMotion/table/table_utils.rb
ProMotion-2.8.2 lib/ProMotion/table/table_utils.rb
ProMotion-2.8.1 lib/ProMotion/table/table_utils.rb
ProMotion-2.8.0 lib/ProMotion/table/table_utils.rb
ProMotion-2.7.1 lib/ProMotion/table/table_utils.rb
ProMotion-2.7.0 lib/ProMotion/table/table_utils.rb
ProMotion-2.6.1 lib/ProMotion/table/table_utils.rb
ProMotion-2.6.0 lib/ProMotion/table/table_utils.rb
ProMotion-2.5.0 lib/ProMotion/table/table_utils.rb
ProMotion-2.5.0.beta1 lib/ProMotion/table/table_utils.rb
ProMotion-2.4.2 lib/ProMotion/table/table_utils.rb
ProMotion-2.4.1 lib/ProMotion/table/table_utils.rb
ProMotion-2.4.0 lib/ProMotion/table/table_utils.rb
ProMotion-2.3.1 lib/ProMotion/table/table_utils.rb
ProMotion-2.3.0 lib/ProMotion/table/table_utils.rb
ProMotion-2.2.2 lib/ProMotion/table/table_utils.rb
ProMotion-2.2.1 lib/ProMotion/table/table_utils.rb
ProMotion-2.2.0 lib/ProMotion/table/table_utils.rb
ProMotion-2.1.0 lib/ProMotion/table/table_utils.rb
ProMotion-2.1.0.beta1 lib/ProMotion/table/table_utils.rb