Method: Stick::Matrix#coerce
- Defined in:
- lib/stick/matrix/core.rb
#coerce(other) ⇒ Object
FIXME: describe #coerce.
910 911 912 913 914 915 916 917 |
# File 'lib/stick/matrix/core.rb', line 910 def coerce(other) case other when Numeric return Scalar.new(other), self else raise TypeError, "#{self.class} can't be coerced into #{other.class}" end end |