Class: Hachi::Models::Case
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#flag ⇒ Object
readonly
Returns the value of attribute flag.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
-
#severity ⇒ Object
readonly
Returns the value of attribute severity.
-
#start_date ⇒ Object
readonly
Returns the value of attribute start_date.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#tlp ⇒ Object
readonly
Returns the value of attribute tlp.
Instance Method Summary collapse
-
#initialize(title:, description:, severity: nil, start_date: nil, owner: nil, flag: nil, tlp: nil, tags: nil) ⇒ Case
constructor
A new instance of Case.
- #payload ⇒ Object
Constructor Details
#initialize(title:, description:, severity: nil, start_date: nil, owner: nil, flag: nil, tlp: nil, tags: nil) ⇒ Case
Returns a new instance of Case.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/hachi/models/case.rb', line 15 def initialize(title:, description:, severity: nil, start_date: nil, owner: nil, flag: nil, tlp: nil, tags: nil) @title = title @description = description @severity = severity @start_date = start_date @owner = owner @flag = flag @tlp = tlp @tags = validate_flag if flag validate_severity if severity validate_start_date if start_date if validate_tlp if tlp end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
7 8 9 |
# File 'lib/hachi/models/case.rb', line 7 def description @description end |
#flag ⇒ Object (readonly)
Returns the value of attribute flag.
11 12 13 |
# File 'lib/hachi/models/case.rb', line 11 def flag @flag end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
10 11 12 |
# File 'lib/hachi/models/case.rb', line 10 def owner @owner end |
#severity ⇒ Object (readonly)
Returns the value of attribute severity.
8 9 10 |
# File 'lib/hachi/models/case.rb', line 8 def severity @severity end |
#start_date ⇒ Object (readonly)
Returns the value of attribute start_date.
9 10 11 |
# File 'lib/hachi/models/case.rb', line 9 def start_date @start_date end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
13 14 15 |
# File 'lib/hachi/models/case.rb', line 13 def @tags end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'lib/hachi/models/case.rb', line 6 def title @title end |
#tlp ⇒ Object (readonly)
Returns the value of attribute tlp.
12 13 14 |
# File 'lib/hachi/models/case.rb', line 12 def tlp @tlp end |
Instance Method Details
#payload ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/hachi/models/case.rb', line 32 def payload { title: title, description: description, severity: severity, startDate: start_date, owner: owner, flag: flag, tlp: tlp, tags: }.compact end |