Class: MetaProject::Tracker::Issue
- Inherits:
-
Object
- Object
- MetaProject::Tracker::Issue
- Defined in:
- lib/meta_project/tracker/issue.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#close ⇒ Object
Closes the issue (adding a comment consisting of the
detail
). -
#create ⇒ Object
Creates a new issue (consisting of the
summary
anddetail
). -
#detail ⇒ Object
The details of the issue (typically several lines) NOTE: This may be currently be nil for some trackers.
-
#identifier ⇒ Object
The id of the issue in the tracker.
-
#initialize(tracker, attributes = {}) ⇒ Issue
constructor
A new instance of Issue.
-
#summary ⇒ Object
The summary of the issue (typically a one-liner).
-
#update ⇒ Object
Adds a comment (consisting of the
detail
) to the issue. -
#url ⇒ Object
An URL pointing to the issue in the associated tracker, or nil if the issue doesn’t exist.
Constructor Details
#initialize(tracker, attributes = {}) ⇒ Issue
Returns a new instance of Issue.
6 7 8 9 |
# File 'lib/meta_project/tracker/issue.rb', line 6 def initialize(tracker, attributes={}) @tracker = tracker @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
4 5 6 |
# File 'lib/meta_project/tracker/issue.rb', line 4 def attributes @attributes end |
Instance Method Details
#close ⇒ Object
Closes the issue (adding a comment consisting of the detail
)
48 49 50 |
# File 'lib/meta_project/tracker/issue.rb', line 48 def close @tracker.close(self) end |
#create ⇒ Object
Creates a new issue (consisting of the summary
and detail
)
43 44 45 |
# File 'lib/meta_project/tracker/issue.rb', line 43 def create @tracker.create(self) end |
#detail ⇒ Object
The details of the issue (typically several lines) NOTE: This may be currently be nil for some trackers.
32 33 34 35 |
# File 'lib/meta_project/tracker/issue.rb', line 32 def detail @tracker.materialize(self) unless @attributes[:detail] @attributes[:detail] end |
#identifier ⇒ Object
The id of the issue in the tracker
19 20 21 22 |
# File 'lib/meta_project/tracker/issue.rb', line 19 def identifier @tracker.materialize(self) unless @attributes[:identifier] @attributes[:identifier] end |
#summary ⇒ Object
The summary of the issue (typically a one-liner)
25 26 27 28 |
# File 'lib/meta_project/tracker/issue.rb', line 25 def summary @tracker.materialize(self) unless @attributes[:summary] @attributes[:summary] end |
#update ⇒ Object
Adds a comment (consisting of the detail
) to the issue
38 39 40 |
# File 'lib/meta_project/tracker/issue.rb', line 38 def update @tracker.update(self) end |
#url ⇒ Object
An URL pointing to the issue in the associated tracker, or nil if the issue doesn’t exist.
13 14 15 16 |
# File 'lib/meta_project/tracker/issue.rb', line 13 def url @tracker.materialize(self) unless @attributes[:url] @attributes[:url] end |