Class: RailsParam::Coercion::ArrayParam

Inherits:
VirtualParam show all
Defined in:
lib/rails_param/coercion/array_param.rb

Instance Attribute Summary

Attributes inherited from VirtualParam

#options, #param, #type

Instance Method Summary collapse

Methods inherited from VirtualParam

#initialize

Constructor Details

This class inherits a constructor from RailsParam::Coercion::VirtualParam

Instance Method Details

#coerceObject



4
5
6
7
8
# File 'lib/rails_param/coercion/array_param.rb', line 4

def coerce
  return param if param.is_a?(Array)

  Array(param.split(options[:delimiter] || ","))
end