paginator 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/paginator.rb +6 -1
- metadata +52 -44
data/lib/paginator.rb
CHANGED
@@ -2,7 +2,7 @@ require 'forwardable'
|
|
2
2
|
|
3
3
|
class Paginator
|
4
4
|
|
5
|
-
VERSION = '1.1.
|
5
|
+
VERSION = '1.1.1'
|
6
6
|
|
7
7
|
include Enumerable
|
8
8
|
|
@@ -83,6 +83,11 @@ class Paginator
|
|
83
83
|
@items ||= @select.call
|
84
84
|
end
|
85
85
|
|
86
|
+
# Does this page have any items?
|
87
|
+
def empty?
|
88
|
+
items.empty?
|
89
|
+
end
|
90
|
+
|
86
91
|
# Checks to see if there's a page before this one
|
87
92
|
def prev?
|
88
93
|
@number > 1
|
metadata
CHANGED
@@ -1,33 +1,37 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.4
|
3
|
-
specification_version: 1
|
4
2
|
name: paginator
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.1.
|
7
|
-
date: 2007-08-12 00:00:00 -05:00
|
8
|
-
summary: A generic paginator object for use in any Ruby program
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: bruce@codefluency.com
|
12
|
-
homepage: http://paginator.rubyforge.org
|
13
|
-
rubyforge_project: paginator
|
14
|
-
description: Paginator doesn't make any assumptions as to how data is retrieved; you just have to provide it with the total number of objects and a way to pull a specific set of objects based on the offset and number of objects per page.
|
15
|
-
autorequire:
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
version: 1.1.1
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- Bruce Williams
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-06-25 00:00:00 -05:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: hoe
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.6.0
|
24
|
+
version:
|
25
|
+
description: Paginator doesn't make any assumptions as to how data is retrieved; you just have to provide it with the total number of objects and a way to pull a specific set of objects based on the offset and number of objects per page.
|
26
|
+
email: bruce@codefluency.com
|
27
|
+
executables:
|
28
|
+
- paginator
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- History.txt
|
33
|
+
- Manifest.txt
|
34
|
+
- README.txt
|
31
35
|
files:
|
32
36
|
- History.txt
|
33
37
|
- Manifest.txt
|
@@ -36,28 +40,32 @@ files:
|
|
36
40
|
- bin/paginator
|
37
41
|
- lib/paginator.rb
|
38
42
|
- test/test_paginator.rb
|
39
|
-
|
40
|
-
|
43
|
+
has_rdoc: true
|
44
|
+
homepage: http://paginator.rubyforge.org
|
45
|
+
post_install_message:
|
41
46
|
rdoc_options:
|
42
47
|
- --main
|
43
48
|
- README.txt
|
44
|
-
|
45
|
-
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
-
|
50
|
-
|
51
|
-
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: "0"
|
56
|
+
version:
|
57
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: "0"
|
62
|
+
version:
|
52
63
|
requirements: []
|
53
64
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 1.2.1
|
63
|
-
version:
|
65
|
+
rubyforge_project: paginator
|
66
|
+
rubygems_version: 1.2.0
|
67
|
+
signing_key:
|
68
|
+
specification_version: 2
|
69
|
+
summary: A generic paginator object for use in any Ruby program
|
70
|
+
test_files:
|
71
|
+
- test/test_paginator.rb
|