module TogetherHelper

TogetherHelper

Public Instance Methods

get_args_for_together(i) click to toggle source
# File lib/open_classes/array/together_helper.rb, line 11
def get_args_for_together(i)
  eval_each = []
  each_with_index { |j_v, j|eval_each << "self[#{j}][#{i}]" }
  eval_each
end
get_args_str_for_together(i, with_index = false) click to toggle source
# File lib/open_classes/array/together_helper.rb, line 17
def get_args_str_for_together(i, with_index = false)
  each_eval = with_index ? get_args_for_together(i) << i : get_args_for_together(i)
  each_eval.join(',')
end
if_not_contain_array_rails_type_error() click to toggle source
# File lib/open_classes/array/together_helper.rb, line 7
def if_not_contain_array_rails_type_error
  each { |f|fail TypeError, "you have to use [Array1, Array2, ...] | #{f.class} is invalid" unless f.class == Array }
end
together_return_multi?(list) click to toggle source
# File lib/open_classes/array/together_helper.rb, line 22
def together_return_multi?(list)
  (list.class == Array && list.size == size).to_bool
end