Class: IABConsentString::Purpose
- Inherits:
-
Object
- Object
- IABConsentString::Purpose
- Defined in:
- lib/iab_consent_string/purpose.rb
Constant Summary collapse
- STORAGE_AND_ACCESS =
The storage of information, or access to information that is already stored, on user device such as accessing advertising identifiers and/or other device identifiers, and/or using cookies or similar technologies.
1
- PERSONALIZATION =
The collection and processing of information about user of a site to subsequently personalize advertising for them in other contexts,
i.e. on other sites or apps, over time. Typically, the content of the site or app is used to make inferences about user interests, which inform future selections.
2
- AD_SELECTION =
The collection of information and combination with previously collected information, to select and deliver advertisements and to measure the delivery and effectiveness of such advertisements. This includes using previously collected information about user interests to select ads, processing data about what advertisements were shown, how often they were shown, when and where they were shown, and whether they took any action related to the advertisement, including for example clicking an ad or making a purchase.
3
- CONTENT_DELIVERY =
The collection of information, and combination with previously collected information, to select and deliver content and to measure the delivery and effectiveness of such content. This includes using previously collected information about user interests to select content, processing data about what content was shown, how often or how long it was shown, when and where it was shown, and whether they took any action related to the content, including for example clicking on content.
4
- MEASUREMENT =
The collection of information about user use of content, and combination with previously collected information, used to measure, understand, and report on user usage of content.
5
- GEOLOCALIZED_ADS =
Ads targeted on geolocalization
6
- UNDEFINED =
Purpose ID that is currently not defined
-1
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #getId ⇒ Object
-
#initialize(id) ⇒ Purpose
constructor
A new instance of Purpose.
- #valueOf ⇒ Object
Constructor Details
#initialize(id) ⇒ Purpose
Returns a new instance of Purpose.
29 30 31 32 33 34 35 36 |
# File 'lib/iab_consent_string/purpose.rb', line 29 def initialize(id) case id when STORAGE_AND_ACCESS, PERSONALIZATION, AD_SELECTION, CONTENT_DELIVERY, MEASUREMENT, GEOLOCALIZED_ADS @id = id else @id = -1 end end |
Instance Method Details
#==(other) ⇒ Object
46 47 48 |
# File 'lib/iab_consent_string/purpose.rb', line 46 def ==(other) @id == other.getId end |
#eql?(other) ⇒ Boolean
42 43 44 |
# File 'lib/iab_consent_string/purpose.rb', line 42 def eql?(other) @id == other.getId end |
#getId ⇒ Object
38 39 40 |
# File 'lib/iab_consent_string/purpose.rb', line 38 def getId @id end |
#valueOf ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/iab_consent_string/purpose.rb', line 50 def valueOf() case @id when STORAGE_AND_ACCESS return "STORAGE_AND_ACCESS" when PERSONALIZATION return "PERSONALIZATION" when AD_SELECTION return "AD_SELECTION" when CONTENT_DELIVERY return "CONTENT_DELIVERY" when MEASUREMENT return "MEASUREMENT" when GEOLOCALIZED_ADS return "GEOLOCALIZED_ADS" else return "UNDEFINED" end end |