Method: Main::Parameter#apply_casting

Defined in:
lib/main/parameter.rb

#apply_castingObject



201
202
203
204
205
206
207
208
# File 'lib/main/parameter.rb', line 201

def apply_casting 
  if cast?
    op = cast.respond_to?('call') ? cast : Cast[cast]
    values.map! do |val|
      Parameter.wrap_errors{ op.call val }
    end
  end
end