RubyGems
npm
Organizations
Log in
Sign up
RubyGems
2DArray
Versions diffs
0.1.3 → 0.1.5
2DArray 0.1.3 → 0.1.5
Sign up to get
free
protection for your applications and to get access to all the features.
Files changed (2)
hide
show
data/lib/2DArray.rb
+7
-0
metadata
+1
-1
data/lib/2DArray.rb
CHANGED
@@ -40,4 +40,11 @@ class Array2D
40
40
def size
41
41
@stuff.flatten(1).size
42
42
end
43
+
44
+
# Returns the number of rows.
45
+
def width
46
+
@stuff.size
47
+
end
48
+
49
+
# TODO: Implement a method to return the number of columns.
43
50
end
metadata
CHANGED
@@ -2,7 +2,7 @@
2
2
name: 2DArray
3
3
version: !ruby/object:Gem::Version
4
4
prerelease:
5
-
version: 0.1.
3
5
+
version: 0.1.
5
6
6
platform: ruby
7
7
authors:
8
8
- J. Wostenberg