Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/carray/basics.rb
Overview
Container -> CArray coercion (relocated from former basic.rb)
Instance Method Summary collapse
-
#to_ca(writable: false) ⇒ CArray
Returns
selfcoerced into aCA_OBJECTCArray of matching shape.
Instance Method Details
#to_ca(writable: false) ⇒ CArray
406 407 408 409 410 411 412 |
# File 'lib/carray/basics.rb', line 406 def to_ca(writable: false) if writable raise "#{self.class}#to_ca builds a new array; " \ "it can't satisfy `writable: true'" end return CA_OBJECT(self) end |