Module: ParamsReady::Parameter::ArrayParameterDefinition::ArrayLike

Included in:
ParamsReady::Parameter::ArrayParameterDefinition, TupleParameterDefinition
Defined in:
lib/params_ready/parameter/array_parameter.rb

Instance Method Summary collapse

Instance Method Details

#duplicate_value(value) ⇒ Object



139
140
141
142
143
# File 'lib/params_ready/parameter/array_parameter.rb', line 139

def duplicate_value(value)
  value.map do |param|
    param.dup
  end
end

#freeze_value(value) ⇒ Object



145
146
147
148
# File 'lib/params_ready/parameter/array_parameter.rb', line 145

def freeze_value(value)
  value.each(&:freeze)
  value.freeze
end