mirror of
https://github.com/ditkrg/schemable.git
synced 2026-01-22 22:26:41 +00:00
Adds custom_defined_enum_method config to global configs
This commit is contained in:
parent
5a0efd1b60
commit
bda6e081de
@ -7,7 +7,8 @@ module Schemable
|
|||||||
:float_as_string,
|
:float_as_string,
|
||||||
:decimal_as_string,
|
:decimal_as_string,
|
||||||
:custom_type_mappers,
|
:custom_type_mappers,
|
||||||
:disable_factory_bot
|
:disable_factory_bot,
|
||||||
|
:custom_defined_enum_method
|
||||||
)
|
)
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@ -17,6 +18,7 @@ module Schemable
|
|||||||
@custom_type_mappers = {}
|
@custom_type_mappers = {}
|
||||||
@decimal_as_string = false
|
@decimal_as_string = false
|
||||||
@disable_factory_bot = true
|
@disable_factory_bot = true
|
||||||
|
@custom_defined_enum_method = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def type_mapper(type_name)
|
def type_mapper(type_name)
|
||||||
|
|||||||
@ -5,6 +5,7 @@ module Schemable
|
|||||||
attr_accessor float_as_string: bool
|
attr_accessor float_as_string: bool
|
||||||
attr_accessor decimal_as_string: bool
|
attr_accessor decimal_as_string: bool
|
||||||
attr_accessor disable_factory_bot: bool
|
attr_accessor disable_factory_bot: bool
|
||||||
|
attr_accessor custom_defined_enum_method: Symbol?
|
||||||
attr_accessor custom_type_mappers: Hash[Symbol, any]
|
attr_accessor custom_type_mappers: Hash[Symbol, any]
|
||||||
|
|
||||||
def initialize: -> void
|
def initialize: -> void
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user