Class: SchemaSerializer::Configuration
- Inherits:
-
Object
- Object
- SchemaSerializer::Configuration
- Defined in:
- lib/schema_serializer/configuration.rb
Constant Summary collapse
- VALID_OPTIONS =
[ :raise_on_null, ].freeze
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
- #merge(options) ⇒ Object
- #reset ⇒ Object
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( = {}) reset merge() end |
Instance Method Details
#merge(options) ⇒ Object
14 15 16 17 |
# File 'lib/schema_serializer/configuration.rb', line 14 def merge() .each_key { |key| send("#{key}=", [key]) } self end |
#reset ⇒ Object
19 20 21 |
# File 'lib/schema_serializer/configuration.rb', line 19 def reset @raise_on_null = true end |