Class: Copyleaks::SubmissionScanning
- Inherits:
-
Object
- Object
- Copyleaks::SubmissionScanning
- Defined in:
- lib/copyleaks/models/submissions/properties/scanning.rb
Instance Method Summary collapse
- #as_json(*_args) ⇒ Object
-
#initialize(internet = false, exclude = nil, repositories = nil, copyleaksDb = nil, crossLanguages = nil) ⇒ SubmissionScanning
constructor
A new instance of SubmissionScanning.
- #to_json(*options) ⇒ Object
Constructor Details
#initialize(internet = false, exclude = nil, repositories = nil, copyleaksDb = nil, crossLanguages = nil) ⇒ SubmissionScanning
Returns a new instance of SubmissionScanning.
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/copyleaks/models/submissions/properties/scanning.rb', line 31 def initialize( internet = false, exclude = nil, repositories = nil, copyleaksDb = nil, crossLanguages = nil ) @internet = internet @exclude = exclude @repositories = repositories @copyleaksDb = copyleaksDb @crossLanguages = crossLanguages end |
Instance Method Details
#as_json(*_args) ⇒ Object
45 46 47 48 49 50 51 52 53 |
# File 'lib/copyleaks/models/submissions/properties/scanning.rb', line 45 def as_json(*_args) { internet: @internet, exclude: @exclude, repositories: @repositories, copyleaksDb: @copyleaksDb, crossLanguages: @crossLanguages }.select { |_k, v| !v.nil? } end |
#to_json(*options) ⇒ Object
55 56 57 |
# File 'lib/copyleaks/models/submissions/properties/scanning.rb', line 55 def to_json(*) as_json(*).to_json(*) end |