Class: Copyleaks::SubmissionScanningCopyleaksDB
- Inherits:
-
Object
- Object
- Copyleaks::SubmissionScanningCopyleaksDB
- Defined in:
- lib/copyleaks/models/submissions/properties/copyleaks_db.rb
Instance Method Summary collapse
- #as_json(*_args) ⇒ Object
-
#initialize(includeMySubmissions, includeOthersSubmissions) ⇒ SubmissionScanningCopyleaksDB
constructor
A new instance of SubmissionScanningCopyleaksDB.
- #to_json(*options) ⇒ Object
Constructor Details
#initialize(includeMySubmissions, includeOthersSubmissions) ⇒ SubmissionScanningCopyleaksDB
Returns a new instance of SubmissionScanningCopyleaksDB.
28 29 30 31 |
# File 'lib/copyleaks/models/submissions/properties/copyleaks_db.rb', line 28 def initialize(includeMySubmissions, includeOthersSubmissions) @includeMySubmissions = includeMySubmissions @includeOthersSubmissions = includeOthersSubmissions end |
Instance Method Details
#as_json(*_args) ⇒ Object
33 34 35 36 37 38 |
# File 'lib/copyleaks/models/submissions/properties/copyleaks_db.rb', line 33 def as_json(*_args) { includeMySubmissions: @includeMySubmissions, includeOthersSubmissions: @includeOthersSubmissions }.select { |_k, v| !v.nil? } end |
#to_json(*options) ⇒ Object
40 41 42 |
# File 'lib/copyleaks/models/submissions/properties/copyleaks_db.rb', line 40 def to_json(*) as_json(*).to_json(*) end |