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