Module: Charty::VectorAdapters::IndexSupport
- Included in:
- ArrayAdapter, NArrayAdapter, NMatrixAdapter, NumpyAdapter
- Defined in:
- lib/charty/vector_adapters.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
Instance Method Summary collapse
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index.
140 141 142 |
# File 'lib/charty/vector_adapters.rb', line 140 def index @index end |
Instance Method Details
#[](key) ⇒ Object
142 143 144 145 146 147 148 149 |
# File 'lib/charty/vector_adapters.rb', line 142 def [](key) case key when Charty::Vector where(key) else super(key_to_loc(key)) end end |
#[]=(key, val) ⇒ Object
151 152 153 |
# File 'lib/charty/vector_adapters.rb', line 151 def []=(key, val) super(key_to_loc(key), val) end |