Class: MapFields::ParamsParser
- Inherits:
-
Object
- Object
- MapFields::ParamsParser
- Defined in:
- lib/map_fields.rb
Class Method Summary collapse
Class Method Details
.parse(params, field = nil) ⇒ Object
152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/map_fields.rb', line 152 def self.parse(params, field = nil) result = [] params.each do |key,value| if field.nil? || field.to_s == key.to_s check_values(value) do |k,v| result << ["#{key.to_s}#{k}", v] end end end result end |