leaflet 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,11 +6,15 @@ module Leaflet
6
6
 
7
7
  PartialCollectionCannotBePaginated = Class.new(StandardError)
8
8
 
9
+ attr_accessor :success
10
+
9
11
  # ––––––––––––––
10
12
  # Initialization
11
13
  # ––––––––––––––
12
14
 
13
15
  def initialize(*args)
16
+ @success = true
17
+
14
18
  if args.size == 1
15
19
  # An Array was passed in. "Convert" it to a Collection.
16
20
  replace args.shift
@@ -39,6 +43,10 @@ module Leaflet
39
43
  # Public Instance Getters
40
44
  # –––––––––––––––––––––––
41
45
 
46
+ def success?
47
+ !!success
48
+ end
49
+
42
50
  def total_entries
43
51
  (@total_entries ||= self.size).to_i.abs
44
52
  end
@@ -96,7 +104,7 @@ module Leaflet
96
104
  end
97
105
 
98
106
  def as_json(options = {})
99
- {
107
+ {
100
108
  total_entries: total_entries,
101
109
  total_count: total_count,
102
110
  per_page: per_page,
@@ -2,7 +2,7 @@ module Leaflet
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 5
5
+ TINY = 6
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leaflet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-05 00:00:00.000000000 Z
12
+ date: 2014-01-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: positify
@@ -27,6 +27,22 @@ dependencies:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: 0.0.1
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
30
46
  - !ruby/object:Gem::Dependency
31
47
  name: rspec
32
48
  requirement: !ruby/object:Gem::Requirement
@@ -105,12 +121,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
121
  - - ! '>='
106
122
  - !ruby/object:Gem::Version
107
123
  version: '0'
124
+ segments:
125
+ - 0
126
+ hash: 3863072787603174579
108
127
  required_rubygems_version: !ruby/object:Gem::Requirement
109
128
  none: false
110
129
  requirements:
111
130
  - - ! '>='
112
131
  - !ruby/object:Gem::Version
113
132
  version: '0'
133
+ segments:
134
+ - 0
135
+ hash: 3863072787603174579
114
136
  requirements: []
115
137
  rubyforge_project:
116
138
  rubygems_version: 1.8.23