fountain 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fountain.rb +1 -0
- data/lib/fountain/api/applicants.rb +1 -1
- data/lib/fountain/applicants.rb +32 -0
- data/lib/fountain/gem_version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7c178b17cde03114db2e4178269ab70cecde4f4
|
4
|
+
data.tar.gz: d95e9956f12dac35dbebbb08312210bc251a171b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccd918c0536dba8522e8cea212bc534ad4889bd10aac9aae23526996beb7837b2c9ee1c7116bbc55dfbbbdbc6e520c9df9ab935fb829ecc49d64b665ecd11800
|
7
|
+
data.tar.gz: 118bf9d93d02d66df17f46f60f5bd34fcd20a264722bf8d4e98f268f9f7f72e1c68306489eb4bf56656cb02637c4507a5c54de823ca8e6c373ae9820c0cb8183
|
data/lib/fountain.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
module Fountain
|
2
|
+
#
|
3
|
+
# Fountain Applicant collection
|
4
|
+
#
|
5
|
+
class Applicants
|
6
|
+
extend Forwardable
|
7
|
+
|
8
|
+
# Collection current cursor
|
9
|
+
attr_reader :current_cursor
|
10
|
+
|
11
|
+
# Collection next cursor
|
12
|
+
attr_reader :next_cursor
|
13
|
+
|
14
|
+
# Applicant collection
|
15
|
+
attr_reader :applicants
|
16
|
+
|
17
|
+
def_delegators :applicants, :each, :map, :count, :size, :[]
|
18
|
+
|
19
|
+
#
|
20
|
+
# @param [Hash] data Raw applicant data
|
21
|
+
#
|
22
|
+
def initialize(data)
|
23
|
+
raw_data = Util.stringify_hash_keys data
|
24
|
+
pagination = raw_data['pagination']
|
25
|
+
if pagination.is_a? Hash
|
26
|
+
@current_cursor = pagination['current_cursor']
|
27
|
+
@next_cursor = pagination['next_cursor']
|
28
|
+
end
|
29
|
+
@applicants = raw_data['applicants'].map { |attr| Applicant.new attr }
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/fountain/gem_version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fountain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- abrom
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- lib/fountain/api/applicants.rb
|
116
116
|
- lib/fountain/api/request_helper.rb
|
117
117
|
- lib/fountain/applicant.rb
|
118
|
+
- lib/fountain/applicants.rb
|
118
119
|
- lib/fountain/background_check.rb
|
119
120
|
- lib/fountain/configuration.rb
|
120
121
|
- lib/fountain/document_signature.rb
|