Method: Datory::Attributes::Attribute#output_serialization_options

Defined in:
lib/datory/attributes/attribute.rb

#output_serialization_optionsObject

rubocop:disable Metrics/AbcSize



52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/datory/attributes/attribute.rb', line 52

def output_serialization_options # rubocop:disable Metrics/AbcSize
  hash = {
    consists_of: from.consists_of,
    type: from.type
  }

  hash[:min] = from.min if from.min.present?

  hash[:max] = from.max if from.max.present?

  hash[:format] = from.format if from.format.present?

  hash
end