Class: TestKyaniteEnumerableEnumerables
- Defined in
- test/enumerable/test_enumerable_enumerables.rb
Enumeration Of Enumerations
Two-dimensional enumerables or enumerables of objects, which are enumerable.
- Kyanite definitions
- Kyanite class with module included
- Kyanite tests and examples
- Usage
-
require 'kyanite/enumerable/enumerable_enumerables'
Instance Method Summary (collapse)
Instance Method Details
- (Object) test_rectangle1
15 16 17 18 19 20 21 22 23 24 |
# File 'test/enumerable/test_enumerable_enumerables.rb', line 15 def test_rectangle1 test = ArrayOfEnumerables.new test << [ :a, :b, :c ] test << [ 1, 2, 3 ] test << [ 'i', 'ii', 'iii' ] assert_equal test, test.rectangle assert_equal test, test.rectangle.rectangle assert_equal test.transpose, test.rectangle.transpose.to_array_of_enumerables.rectangle end |
- (Object) test_rectangle2
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'test/enumerable/test_enumerable_enumerables.rb', line 28 def test_rectangle2 test = ArrayOfEnumerables.new test << [ :a, :b, :c ] test << [ 1, 2, 3, 4 ] test << [ 'i', 'ii' ] expc = ArrayOfEnumerables.new expc << [ :a, :b, :c ] expc << [ 1, 2, 3 ] expc << [ 'i', 'ii', nil ] assert_equal expc, test.rectangle assert_equal expc, test.rectangle.rectangle assert_equal expc.transpose, test.rectangle.transpose.to_array_of_enumerables.rectangle end |