module ProMotion::Table::Utils
Public Instance Methods
array_all_members_of?(arr, klass)
click to toggle source
Determines if all members of an array are a certain class
# File lib/ProMotion/table/table_utils.rb, line 13 def array_all_members_of?(arr, klass) arr.select{ |e| e.is_a?(klass) }.length == arr.length end
index_path_to_section_index(params)
click to toggle source
# File lib/ProMotion/table/table_utils.rb, line 4 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