Module: Kernel
- Defined in:
- scripts/00000 Dependencies/00202 PatchRuby.rb
Instance Method Summary collapse
-
#from(other) ⇒ self
Infer the object as the specified class (lint).
Instance Method Details
#from(other) ⇒ self
Infer the object as the specified class (lint)
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 |