Class: Policygen::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/policygen/configuration.rb

Overview

Policygen configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Initializes a new instance of Configuration class.



186
187
188
# File 'lib/policygen/configuration.rb', line 186

def initialize
  reset_defaults!
end

Instance Attribute Details

#app_usage_dataObject

Do you store logs or app usage data?



135
136
137
# File 'lib/policygen/configuration.rb', line 135

def app_usage_data
  @app_usage_data
end

#auto_renewObject

Auto renew subscription



63
64
65
# File 'lib/policygen/configuration.rb', line 63

def auto_renew
  @auto_renew
end

#css_frameworkObject

Which css framework to use



9
10
11
# File 'lib/policygen/configuration.rb', line 9

def css_framework
  @css_framework
end

#data_retention_periodObject

Data retention period



165
166
167
# File 'lib/policygen/configuration.rb', line 165

def data_retention_period
  @data_retention_period
end

#dispute_resolutionObject

Dispute resolution clause



81
82
83
# File 'lib/policygen/configuration.rb', line 81

def dispute_resolution
  @dispute_resolution
end

#dpoObject

Do you have a Data Protection Officer (DPO)?



174
175
176
# File 'lib/policygen/configuration.rb', line 174

def dpo
  @dpo
end

#dpo_emailObject

Your DPO’s email



180
181
182
# File 'lib/policygen/configuration.rb', line 180

def dpo_email
  @dpo_email
end

#dpo_nameObject

Your DPO’s name



177
178
179
# File 'lib/policygen/configuration.rb', line 177

def dpo_name
  @dpo_name
end

#dpo_phoneObject

Your DPO’s phone number



183
184
185
# File 'lib/policygen/configuration.rb', line 183

def dpo_phone
  @dpo_phone
end

#entity_addressObject

Your entity address



21
22
23
# File 'lib/policygen/configuration.rb', line 21

def entity_address
  @entity_address
end

#entity_locationObject

Entity location



42
43
44
# File 'lib/policygen/configuration.rb', line 42

def entity_location
  @entity_location
end

#entity_nameObject

Your entity name



15
16
17
# File 'lib/policygen/configuration.rb', line 15

def entity_name
  @entity_name
end

#entity_websiteObject

Your entity website



18
19
20
# File 'lib/policygen/configuration.rb', line 18

def entity_website
  @entity_website
end

#free_trialObject

Free trial



60
61
62
# File 'lib/policygen/configuration.rb', line 60

def free_trial
  @free_trial
end

#governing_lawObject

Governing law for the terms of service



78
79
80
# File 'lib/policygen/configuration.rb', line 78

def governing_law
  @governing_law
end

What legal basis do you have for processing data?



162
163
164
# File 'lib/policygen/configuration.rb', line 162

def legal_basis
  @legal_basis
end

#liability_limitationObject

Limitation of liability clause



108
109
110
# File 'lib/policygen/configuration.rb', line 108

def liability_limitation
  @liability_limitation
end

#liability_limitation_amountObject

Liability amount



117
118
119
# File 'lib/policygen/configuration.rb', line 117

def liability_limitation_amount
  @liability_limitation_amount
end

#liability_limitation_timeframeObject

Liability timeframe



114
115
116
# File 'lib/policygen/configuration.rb', line 114

def liability_limitation_timeframe
  @liability_limitation_timeframe
end

#liability_limitation_typeObject

Liability limitation type



111
112
113
# File 'lib/policygen/configuration.rb', line 111

def liability_limitation_type
  @liability_limitation_type
end

#locationsObject

User locations the policy applies to



39
40
41
# File 'lib/policygen/configuration.rb', line 39

def locations
  @locations
end

#mediationObject

Mediation clause



84
85
86
# File 'lib/policygen/configuration.rb', line 84

def mediation
  @mediation
end

#payment_dataObject

Collected payment data



129
130
131
# File 'lib/policygen/configuration.rb', line 129

def payment_data
  @payment_data
end

#payment_processorsObject

Payment processors used



132
133
134
# File 'lib/policygen/configuration.rb', line 132

def payment_processors
  @payment_processors
end

#personal_informationObject

Collected personal information



120
121
122
# File 'lib/policygen/configuration.rb', line 120

def personal_information
  @personal_information
end

#platformsObject

Platforms the policies applies to



36
37
38
# File 'lib/policygen/configuration.rb', line 36

def platforms
  @platforms
end

#privacy_emailObject

Your privacy policy email



27
28
29
# File 'lib/policygen/configuration.rb', line 27

def privacy_email
  @privacy_email
end

#privacy_last_updatedObject

Privacy policy last updated



30
31
32
# File 'lib/policygen/configuration.rb', line 30

def privacy_last_updated
  @privacy_last_updated
end

#privacy_pageObject

Do you have a privacy management page to link to?



171
172
173
# File 'lib/policygen/configuration.rb', line 171

def privacy_page
  @privacy_page
end

#prohibited_usesObject

Prohibited uses clause



87
88
89
# File 'lib/policygen/configuration.rb', line 87

def prohibited_uses
  @prohibited_uses
end

#purchasable_goodsObject

Sell purchasable goods



54
55
56
# File 'lib/policygen/configuration.rb', line 54

def purchasable_goods
  @purchasable_goods
end

#refund_policyObject

Refund policy



66
67
68
# File 'lib/policygen/configuration.rb', line 66

def refund_policy
  @refund_policy
end

#security_measuresObject

Do you have robust security measures in place?



150
151
152
# File 'lib/policygen/configuration.rb', line 150

def security_measures
  @security_measures
end

#sensitive_informationObject

Collected sensitive information



123
124
125
# File 'lib/policygen/configuration.rb', line 123

def sensitive_information
  @sensitive_information
end

#service_requirementsObject

What do you need to perform to deliver your service?



159
160
161
# File 'lib/policygen/configuration.rb', line 159

def service_requirements
  @service_requirements
end

#service_slaObject

Service SLA



90
91
92
# File 'lib/policygen/configuration.rb', line 90

def service_sla
  @service_sla
end

#service_sla_amountObject

Service SLA amount



93
94
95
# File 'lib/policygen/configuration.rb', line 93

def service_sla_amount
  @service_sla_amount
end

#service_sla_customObject

Service SLA custom clause



105
106
107
# File 'lib/policygen/configuration.rb', line 105

def service_sla_custom
  @service_sla_custom
end

#service_sla_refundObject

Service SLA refund



99
100
101
# File 'lib/policygen/configuration.rb', line 99

def service_sla_refund
  @service_sla_refund
end

#service_sla_refund_typeObject

Service SLA refund type



102
103
104
# File 'lib/policygen/configuration.rb', line 102

def service_sla_refund_type
  @service_sla_refund_type
end

#service_sla_timeframeObject

Service SLA timeframe



96
97
98
# File 'lib/policygen/configuration.rb', line 96

def service_sla_timeframe
  @service_sla_timeframe
end

#social_sign_inObject

Do you use social sign-in?



51
52
53
# File 'lib/policygen/configuration.rb', line 51

def 
  @social_sign_in
end

#subscriptionObject

Subscription



57
58
59
# File 'lib/policygen/configuration.rb', line 57

def subscription
  @subscription
end

#support_emailObject

Your support email



24
25
26
# File 'lib/policygen/configuration.rb', line 24

def support_email
  @support_email
end

#tailwind_configObject

Tailwind CSS configuration



12
13
14
# File 'lib/policygen/configuration.rb', line 12

def tailwind_config
  @tailwind_config
end

#third_party_analyticsObject

Do you use third party analytics?



156
157
158
# File 'lib/policygen/configuration.rb', line 156

def third_party_analytics
  @third_party_analytics
end

#third_party_dataObject

Collected third party data



126
127
128
# File 'lib/policygen/configuration.rb', line 126

def third_party_data
  @third_party_data
end

#third_party_disclosureObject

Do you disclose personal information to third parties?



138
139
140
# File 'lib/policygen/configuration.rb', line 138

def third_party_disclosure
  @third_party_disclosure
end

#third_party_disclosure_entitiesObject

Third party entities you disclose personal information to



141
142
143
# File 'lib/policygen/configuration.rb', line 141

def third_party_disclosure_entities
  @third_party_disclosure_entities
end

#third_party_sharingObject

Do you sell/share personal information with third parties?



144
145
146
# File 'lib/policygen/configuration.rb', line 144

def third_party_sharing
  @third_party_sharing
end

#third_party_sharing_entitiesObject

Third party entities you sell/share personal information with



147
148
149
# File 'lib/policygen/configuration.rb', line 147

def third_party_sharing_entities
  @third_party_sharing_entities
end

#tos_last_updatedObject

Terms of service last updated



33
34
35
# File 'lib/policygen/configuration.rb', line 33

def tos_last_updated
  @tos_last_updated
end

#under_eighteenObject

Allow users under 18



45
46
47
# File 'lib/policygen/configuration.rb', line 45

def under_eighteen
  @under_eighteen
end

#under_thirteenObject

Allow users under 13



48
49
50
# File 'lib/policygen/configuration.rb', line 48

def under_thirteen
  @under_thirteen
end

#us_state_privacy_lawsObject

Do you support all US state privacy laws?



168
169
170
# File 'lib/policygen/configuration.rb', line 168

def us_state_privacy_laws
  @us_state_privacy_laws
end

#user_accountsObject

Allow users to create accounts



75
76
77
# File 'lib/policygen/configuration.rb', line 75

def user_accounts
  @user_accounts
end

#user_contentObject

Allow users to upload content



69
70
71
# File 'lib/policygen/configuration.rb', line 69

def user_content
  @user_content
end

#user_content_licenseObject

Assign a license to user uploaded content



72
73
74
# File 'lib/policygen/configuration.rb', line 72

def user_content_license
  @user_content_license
end

#web_trackingObject

Do you use tracking cookies/web beacons?



153
154
155
# File 'lib/policygen/configuration.rb', line 153

def web_tracking
  @web_tracking
end

Instance Method Details

#default_tailwind_configObject



190
191
192
193
194
195
196
# File 'lib/policygen/configuration.rb', line 190

def default_tailwind_config
  {
    heading_color: "text-gray-900",
    body_color: "text-gray-800",
    link_color: "text-blue-500"
  }
end

#get_tailwind_config(key) ⇒ Object



198
199
200
# File 'lib/policygen/configuration.rb', line 198

def get_tailwind_config(key)
  @tailwind_config[key] || default_tailwind_config[key]
end

#reset_defaults!Object



202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/policygen/configuration.rb', line 202

def reset_defaults!
  @css_framework = :tailwind
  @tailwind_config = {}

  @entity_name = ""
  @entity_website = ""
  @entity_address = ""
  @support_email = ""
  @privacy_email = ""

  @privacy_last_updated = Date.today.strftime("%Y-%m-%d")
  @tos_last_updated = Date.today.strftime("%Y-%m-%d")

  @platforms = [:web]
  @locations = %i[us eu uk]
  @entity_location = :us
  @under_eighteen = false
  @under_thirteen = false
  @social_sign_in = false

  @purchasable_goods = false
  @subscription = false
  @free_trial = false
  @auto_renew = false
  @refund_policy = :none
  @user_content = false
  @user_content_license = false
  @user_accounts = false
  @governing_law = :california
  @dispute_resolution = :litigation
  @mediation = false
  @prohibited_uses = []

  @service_sla = false
  @service_sla_amount = 0
  @service_sla_timeframe = nil
  @service_sla_refund = false
  @service_sla_refund_type = :full
  @service_sla_custom = nil

  @liability_limitation = false
  @liability_limitation_type = :amount_paid
  @liability_limitation_timeframe = nil
  @liability_limitation_amount = 0

  @personal_information = []
  @sensitive_information = []
  @third_party_data = []
  @payment_data = false
  @payment_processors = []
  @app_usage_data = false
  @third_party_disclosure = false
  @third_party_disclosure_entities = []
  @third_party_sharing = false
  @third_party_sharing_entities = []
  @security_measures = false
  @web_tracking = false
  @third_party_analytics = false
  @service_requirements = []
  @legal_basis = []
  @data_retention_period = nil
  @us_state_privacy_laws = false
  @privacy_page = nil
  @dpo = false
  @dpo_name = nil
  @dpo_email = nil
  @dpo_phone = nil
end