array_2d_simple 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -20,22 +20,23 @@ Or install it without using Gemfile as:
20
20
 
21
21
  Initalization:
22
22
  You must:
23
+
23
24
  require 'array_2d_simple.rb'
24
25
 
25
26
  And within your model:
27
+
26
28
  include Array2dSimple
27
29
 
28
30
  There are 2 ways of putting data in the 2D Array:
29
-
30
- 1. By iterating with #set_by_rc
31
- 2. By passing a block to #set_each(see below)
31
+ 1. By iterating with #set_by_rc
32
+ 2. By passing a block to #set_each(see below)
32
33
 
33
34
 
34
35
  ##Example: A board for tic-tac-toe
35
36
 
36
37
  require 'array_2d_simple.rb'
37
38
 
38
- class Board
39
+ class TicTacToe
39
40
  include Array2dSimple
40
41
 
41
42
  def initialize
@@ -45,13 +46,9 @@ There are 2 ways of putting data in the 2D Array:
45
46
 
46
47
  To fill board with numbers 1-9 and output:
47
48
 
48
- def fill
49
- @board.set_each{ |r, c| r*3 + c+1}
50
- end
49
+ @board.set_each{ |r, c| r*3 + c+1}
51
50
 
52
- def output
53
- @board.output
54
- end
51
+ @board.output
55
52
 
56
53
 
57
54
  ## Contributing
@@ -1,3 +1,3 @@
1
1
  module Array2dSimple
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: array_2d_simple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: