Class: Copyleaks::SubmissionSensitiveData
- Inherits:
-
Object
- Object
- Copyleaks::SubmissionSensitiveData
- Defined in:
- lib/copyleaks/models/submissions/properties/sensitive_data_protection.rb
Instance Method Summary collapse
- #as_json(*_args) ⇒ Object
-
#initialize(driversLicense = false, credentials = false, passport = false, network = false, url = false, emailAddress = false, creditCard = false, phoneNumber = false) ⇒ SubmissionSensitiveData
constructor
A new instance of SubmissionSensitiveData.
- #to_json(*options) ⇒ Object
Constructor Details
#initialize(driversLicense = false, credentials = false, passport = false, network = false, url = false, emailAddress = false, creditCard = false, phoneNumber = false) ⇒ SubmissionSensitiveData
Returns a new instance of SubmissionSensitiveData.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/copyleaks/models/submissions/properties/sensitive_data_protection.rb', line 34 def initialize( driversLicense = false, credentials = false, passport = false, network = false, url = false, emailAddress = false, creditCard = false, phoneNumber = false ) @driversLicense = driversLicense @credentials = credentials @passport = passport @network = network @url = url @emailAddress = emailAddress @creditCard = creditCard @phoneNumber = phoneNumber end |
Instance Method Details
#as_json(*_args) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/copyleaks/models/submissions/properties/sensitive_data_protection.rb', line 54 def as_json(*_args) { driversLicense: @driversLicense, credentials: @credentials, passport: @passport, network: @network, url: @url, emailAddress: @emailAddress, creditCard: @creditCard, phoneNumber: @phoneNumber }.select { |_k, v| !v.nil? } end |
#to_json(*options) ⇒ Object
67 68 69 |
# File 'lib/copyleaks/models/submissions/properties/sensitive_data_protection.rb', line 67 def to_json(*) as_json(*).to_json(*) end |