Class: Eco::API::Session::Config::People
Instance Attribute Summary
Attributes inherited from BaseConfig
#config
Instance Method Summary
collapse
Methods inherited from BaseConfig
#apis, attr_key, #clone, #file_manager, #initialize
Methods inherited from Hash
#deep_merge, #deep_merge!
Instance Method Details
#api_excluded(&block) ⇒ Object
with given a person what is the criteria of exclusion
51
52
53
54
|
# File 'lib/eco/api/session/config/people.rb', line 51
def api_excluded(&block)
return self["api_excluded"] unless block_given?
self["api_excluded"] = block
end
|
11
12
13
|
# File 'lib/eco/api/session/config/people.rb', line 11
def cache
self["cache"] ||= "cache/people.json"
end
|
#cache=(file) ⇒ Object
7
8
9
|
# File 'lib/eco/api/session/config/people.rb', line 7
def cache=(file)
self["cache"] = file
end
|
#default_login_method? ⇒ Boolean
77
78
79
|
# File 'lib/eco/api/session/config/people.rb', line 77
def default_login_method?
!!default_login_method
end
|
#default_schema? ⇒ Boolean
73
74
75
|
# File 'lib/eco/api/session/config/people.rb', line 73
def default_schema?
!!default_schema
end
|
#default_usergroup? ⇒ Boolean
69
70
71
|
# File 'lib/eco/api/session/config/people.rb', line 69
def default_usergroup?
!!default_usergroup
end
|
#discarded_file ⇒ Object
46
47
48
|
# File 'lib/eco/api/session/config/people.rb', line 46
def discarded_file
self["discarded_file"]
end
|
#discarded_file=(file) ⇒ Object
people to exclude from update feeds
42
43
44
|
# File 'lib/eco/api/session/config/people.rb', line 42
def discarded_file=(file)
self["discarded_file"] = file
end
|
#fields_mapper ⇒ Object
61
62
63
|
# File 'lib/eco/api/session/config/people.rb', line 61
def fields_mapper
self["fields_mapper"]
end
|
#fields_mapper=(file) ⇒ Object
internal-external fields map
57
58
59
|
# File 'lib/eco/api/session/config/people.rb', line 57
def fields_mapper=(file)
self["fields_mapper"] = file
end
|
The person parser/serializer for a given format (default csv
).
89
90
91
92
93
94
95
96
97
|
# File 'lib/eco/api/session/config/people.rb', line 89
def parser(format: :csv)
prs = parsers[format] ||= Eco::API::Common::People::PersonParser.new
if block_given?
yield(prs)
self
else
prs
end
end
|
#parsers ⇒ Hash
Returns with defined pairs format key
and Person parsers.
82
83
84
|
# File 'lib/eco/api/session/config/people.rb', line 82
def parsers
self["parsers"] ||= {}
end
|
#partial_cache ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/eco/api/session/config/people.rb', line 15
def partial_cache
if file = self.cache
File.join(File.dirname(file),
File.basename(file, File.extname(file)) + "_partial" + File.extname(file)
)
end
end
|
#requests_folder ⇒ Object
37
38
39
|
# File 'lib/eco/api/session/config/people.rb', line 37
def requests_folder
self["requests_folder"] ||= "requests"
end
|
#requests_folder=(folder) ⇒ Object
33
34
35
|
# File 'lib/eco/api/session/config/people.rb', line 33
def requests_folder=(folder)
self["requests_folder"] = folder
end
|
#strict_search=(value) ⇒ Object
specifies if people search should be strict or not
24
25
26
|
# File 'lib/eco/api/session/config/people.rb', line 24
def strict_search=(value)
self["strict_search"] = !!value
end
|
#strict_search? ⇒ Boolean
28
29
30
|
# File 'lib/eco/api/session/config/people.rb', line 28
def strict_search?
self["strict_search"]
end
|