Module: Wice::WgArray

Defined in:
lib/wice/wice_grid_core_ext.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.to_parameter_name(array) ⇒ Object

Only used by Hash#parameter_names_and_values Transforms [‘foo’, ‘bar’, ‘baz’] to ‘foo[baz]’



103
104
105
# File 'lib/wice/wice_grid_core_ext.rb', line 103

def self.to_parameter_name(array) #:nodoc:
  array[0].to_s + (array[1..-1] || []).collect { |k| '[' + k.to_s + ']' }.join('')
end