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