Module: WGArrayExtensions

Included in:
Array
Defined in:
lib/wice_grid_core_ext.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#to_parameter_nameObject

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



158
159
160
# File 'lib/wice_grid_core_ext.rb', line 158

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