Sha256: 0fe39713cb174c774d06c7d540f4161bf2ec09049d7ed5b9df9ea6075f40646a

Contents?: true

Size: 379 Bytes

Versions: 2

Compression:

Stored size: 379 Bytes

Contents

class SchemaSerializer
  class Configuration
    VALID_OPTIONS = [
      :raise_on_null,
    ].freeze

    attr_accessor(*VALID_OPTIONS)

    def initialize(options = {})
      reset
      merge(options)
    end

    def merge(options)
      options.each_key { |key| send("#{key}=", options[key]) }
      self
    end

    def reset
      @raise_on_null = true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
schema_serializer-0.2.7 lib/schema_serializer/configuration.rb
schema_serializer-0.2.6 lib/schema_serializer/configuration.rb