lib/neo4j/shared/enum.rb in neo4j-7.0.16 vs lib/neo4j/shared/enum.rb in neo4j-7.1.0
- old
+ new
@@ -65,11 +65,11 @@
else
fail ArgumentError, 'Invalid parameter for enum. Please provide an Array or an Hash.'
end
end
- VALID_OPTIONS_FOR_ENUMS = [:_index, :_prefix, :_suffix, :_default]
+ VALID_OPTIONS_FOR_ENUMS = [:_index, :_prefix, :_suffix]
DEFAULT_OPTIONS_FOR_ENUMS = {
_index: true
}
def split_options_and_parameters(parameters)
@@ -86,15 +86,15 @@
end
def define_property(property_name, enum_keys, options)
property_options = build_property_options(enum_keys, options)
property property_name, property_options
- serialize property_name, Neo4j::Shared::TypeConverters::EnumConverter.new(enum_keys, property_options)
+ serialize property_name, Neo4j::Shared::TypeConverters::EnumConverter.new(enum_keys)
end
- def build_property_options(_enum_keys, options = {})
+ def build_property_options(enum_keys, _options = {})
{
- default: options[:_default]
+ default: enum_keys.keys.first
}
end
def define_enum_methods(property_name, enum_keys, options)
define_enum_methods_?(property_name, enum_keys, options)