circular_list 0.0.1 → 0.0.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 +34 -0
- data/lib/circular_list/version.rb +1 -1
- metadata +4 -3
data/README
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
Circular List
|
2
|
+
=============
|
3
|
+
|
4
|
+
A circular list data structure for Ruby.
|
5
|
+
|
6
|
+
How to install
|
7
|
+
--------------
|
8
|
+
|
9
|
+
gem install circular_list
|
10
|
+
|
11
|
+
OR
|
12
|
+
|
13
|
+
gem 'circular_list' in Gemfile
|
14
|
+
|
15
|
+
|
16
|
+
How to use
|
17
|
+
----------
|
18
|
+
|
19
|
+
require 'rubygems'
|
20
|
+
require 'circular_list'
|
21
|
+
|
22
|
+
c = CircularList::List.new([1,2,3])
|
23
|
+
c.fetch_next => 2
|
24
|
+
c.fetch_next => 3
|
25
|
+
c.fetch_next => 1
|
26
|
+
c.fetch_next => 2
|
27
|
+
|
28
|
+
c = CircularList::List.new([1,2,3])
|
29
|
+
c.fetch_previous => 3
|
30
|
+
c.fetch_previous => 2
|
31
|
+
c.fetch_previous => 1
|
32
|
+
c.fetch_previous => 3
|
33
|
+
|
34
|
+
See specs https://github.com/bangthetable/CircularList/blob/master/spec/circular_list/list_spec.rb for more examples.
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: circular_list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- unnitallman
|
@@ -31,6 +31,7 @@ extra_rdoc_files: []
|
|
31
31
|
files:
|
32
32
|
- .gitignore
|
33
33
|
- Gemfile
|
34
|
+
- README
|
34
35
|
- Rakefile
|
35
36
|
- circular_list.gemspec
|
36
37
|
- lib/circular_list.rb
|