Module: Kernel

Defined in:
scripts/00000 Dependencies/00202 PatchRuby.rb

Instance Method Summary collapse

Instance Method Details

#from(other) ⇒ self

Infer the object as the specified class (lint)

Returns:

  • (self)


22
23
24
25
26
# File 'scripts/00000 Dependencies/00202 PatchRuby.rb', line 22

def from(other)
  raise "Object of class #{other.class} cannot be casted as #{self}" unless other.is_a?(self)

  return other
end