Class: Copyleaks::SubmissionScanning

Inherits:
Object
  • Object
show all
Defined in:
lib/copyleaks/models/submissions/properties/scanning.rb

Instance Method Summary collapse

Constructor Details

#initialize(internet = false, exclude = nil, repositories = nil, copyleaksDb = nil, crossLanguages = nil) ⇒ SubmissionScanning

Returns a new instance of SubmissionScanning.

Parameters:



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(*options)
  as_json(*options).to_json(*options)
end