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.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/hachi/models/case.rb', line 8 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.
6 7 8 |
# File 'lib/hachi/models/case.rb', line 6 def description @description end |
#flag ⇒ Object (readonly)
Returns the value of attribute flag.
6 7 8 |
# File 'lib/hachi/models/case.rb', line 6 def flag @flag end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
6 7 8 |
# File 'lib/hachi/models/case.rb', line 6 def owner @owner end |
#severity ⇒ Object (readonly)
Returns the value of attribute severity.
6 7 8 |
# File 'lib/hachi/models/case.rb', line 6 def severity @severity end |
#start_date ⇒ Object (readonly)
Returns the value of attribute start_date.
6 7 8 |
# File 'lib/hachi/models/case.rb', line 6 def start_date @start_date end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
6 7 8 |
# File 'lib/hachi/models/case.rb', line 6 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.
6 7 8 |
# File 'lib/hachi/models/case.rb', line 6 def tlp @tlp end |
Instance Method Details
#payload ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/hachi/models/case.rb', line 25 def payload { title: title, description: description, severity: severity, startDate: start_date, owner: owner, flag: flag, tlp: tlp, tags: }.compact end |