lib/2DArray.rb in 2DArray-0.1.3 vs lib/2DArray.rb in 2DArray-0.1.5
- old
+ new
@@ -38,6 +38,13 @@
end
def size
@stuff.flatten(1).size
end
+
+ # Returns the number of rows.
+ def width
+ @stuff.size
+ end
+
+ # TODO: Implement a method to return the number of columns.
end
\ No newline at end of file