Class: SchemaSerializer::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/schema_serializer/configuration.rb

Constant Summary collapse

VALID_OPTIONS =
[
  :raise_on_null,
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Configuration

Returns a new instance of Configuration.



9
10
11
12
# File 'lib/schema_serializer/configuration.rb', line 9

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

Instance Method Details

#merge(options) ⇒ Object



14
15
16
17
# File 'lib/schema_serializer/configuration.rb', line 14

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

#resetObject



19
20
21
# File 'lib/schema_serializer/configuration.rb', line 19

def reset
  @raise_on_null = true
end