Module: T::Enum::LegacyMigrationMode
- Extended by:
- Helpers
- Includes:
- Kernel
- Defined in:
- lib/types/enum.rb
Constant Summary
Constants included
from Helpers
Helpers::Private
Instance Method Summary
collapse
Methods included from Helpers
abstract!, final!, interface!, mixes_in_class_methods, requires_ancestor, sealed!
Instance Method Details
#==(other) ⇒ Object
249
250
251
252
253
254
255
256
257
258
259
260
261
|
# File 'lib/types/enum.rb', line 249
def ==(other)
case other
when String
if T::Configuration.legacy_t_enum_migration_mode?
comparison_assertion_failed(:==, other)
self.serialize == other
else
false
end
else
super(other)
end
end
|
#===(other) ⇒ Object
265
266
267
268
269
270
271
272
273
274
275
276
277
|
# File 'lib/types/enum.rb', line 265
def ===(other)
case other
when String
if T::Configuration.legacy_t_enum_migration_mode?
comparison_assertion_failed(:===, other)
self.serialize == other
else
false
end
else
super(other)
end
end
|
#serialize ⇒ Object
244
|
# File 'lib/types/enum.rb', line 244
def serialize; end
|