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!

Methods included from Sig

#sig

Instance Method Details

#==(other) ⇒ Object



226
227
228
229
230
231
232
233
234
235
236
237
238
# File 'lib/types/enum.rb', line 226

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



242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/types/enum.rb', line 242

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

#serializeObject



221
# File 'lib/types/enum.rb', line 221

def serialize; end