Sha256: 1f527ac2272ba51706229cffa815dec18b72eeb65747d9b224f117da6a64d580

Contents?: true

Size: 947 Bytes

Versions: 7

Compression:

Stored size: 947 Bytes

Contents

# frozen_string_literal: true

module StoreModel
  # StoreModel configuration.
  class Configuration
    # Controls usage of MergeErrorStrategy
    # @return [Boolean]
    attr_accessor :merge_errors

    # Controls usage of MergeArrayErrorStrategy
    # @return [Boolean]
    attr_accessor :merge_array_errors

    # Controls if the result of `as_json` will contain the unknown attributes of the model
    # @return [Boolean]
    attr_accessor :serialize_unknown_attributes

    # Controls if the result of `as_json` will serialize enum fields using `as_json`
    # @return [Boolean]
    attr_accessor :serialize_enums_using_as_json

    # Controls if parent tracking functionality is enabled.
    # Default: true
    # @return [Boolean]
    attr_accessor :enable_parent_assignment

    def initialize
      @serialize_unknown_attributes = true
      @enable_parent_assignment = true
      @serialize_enums_using_as_json = true
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
store_model-4.2.1 lib/store_model/configuration.rb
store_model-4.2.0 lib/store_model/configuration.rb
store_model-4.1.0 lib/store_model/configuration.rb
store_model-4.0.0 lib/store_model/configuration.rb
store_model-3.0.2 lib/store_model/configuration.rb
store_model-3.0.1 lib/store_model/configuration.rb
store_model-3.0.0 lib/store_model/configuration.rb