lib/support/util.rb
# 
# Extract from the variable part of the parameters an hash or an array
# depending on what king of variable parameters are passed.
# The result can be both used directly both passed as variable arg to 
# other methods.
#
Extract from the variable part of the parameters an hash or an array
depending on what king of variable parameters are passed.
The result can be both used directly both passed as variable arg to
other methods.
Extract from the variable part of the parameters an hash or an array depending on what king of variable parameters are passed . The result can be both used directly both passed as variable arg to other methods .
def extract_va_options va_list, want_hash = true
        if va_list.size.eql?(0) then
          want_hash ? {} : []
        else
          return va_list[0] if va_list[0].is_a?(Hash) && va_list.size.eql?(1)
          va_list
        end
    end
def extract_va_options va_list , want_hash = true if va_list . size . eql? ( 0 ) then want_hash ? { } : [ ] else return va_list [ 0 ] if va_list [ 0 ] . is_a? ( Hash ) && va_list . size . eql? ( 1 ) va_list end end
Extract from the variable part of the parameters an hash or an array
depending on what king of variable parameters are passed.
Extract from the variable part of the parameters an hash or an array depending on what king of variable parameters are passed .
va_list
<not_specific>
want_hash
<not_specific>