Class: SyncIssues::Issue
- Inherits:
-
Object
- Object
- SyncIssues::Issue
- Defined in:
- lib/sync_issues/issue.rb
Overview
Issue represents an issue to be added or updated.
new_title is only used when an issue should be renamed. Issues with new_title set will never be created
Instance Attribute Summary collapse
-
#assignees ⇒ Object
readonly
Returns the value of attribute assignees.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#labels ⇒ Object
readonly
Returns the value of attribute labels.
-
#new_title ⇒ Object
readonly
Returns the value of attribute new_title.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(content, title:, assignees: nil, labels: nil, new_title: nil) ⇒ Issue
constructor
A new instance of Issue.
Constructor Details
#initialize(content, title:, assignees: nil, labels: nil, new_title: nil) ⇒ Issue
Returns a new instance of Issue.
11 12 13 14 15 16 17 18 |
# File 'lib/sync_issues/issue.rb', line 11 def initialize(content, title:, assignees: nil, labels: nil, new_title: nil) @assignees = verify_array_or_string 'assignees', assignees @assignees.sort! unless @assignees.nil? @content = content @labels = verify_array_or_string 'labels', labels @new_title = verify_string 'new_title', new_title, allow_nil: true @title = verify_string 'title', title, allow_nil: false end |
Instance Attribute Details
#assignees ⇒ Object (readonly)
Returns the value of attribute assignees.
9 10 11 |
# File 'lib/sync_issues/issue.rb', line 9 def assignees @assignees end |
#content ⇒ Object (readonly)
Returns the value of attribute content.
9 10 11 |
# File 'lib/sync_issues/issue.rb', line 9 def content @content end |
#labels ⇒ Object (readonly)
Returns the value of attribute labels.
9 10 11 |
# File 'lib/sync_issues/issue.rb', line 9 def labels @labels end |
#new_title ⇒ Object (readonly)
Returns the value of attribute new_title.
9 10 11 |
# File 'lib/sync_issues/issue.rb', line 9 def new_title @new_title end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
9 10 11 |
# File 'lib/sync_issues/issue.rb', line 9 def title @title end |