Class: Issue
- Inherits:
-
Object
- Object
- Issue
- Defined in:
- lib/sleeping-wolf.rb
Instance Attribute Summary collapse
-
#comments ⇒ Object
arrays.
-
#date_opened ⇒ Object
Returns the value of attribute date_opened.
-
#id ⇒ Object
from octopi attr_accessor :repository, :user, :updated_at, :votes, :number, :title attr_accessor :body, :closed_at, :labels, :state, :created_at.
-
#labels ⇒ Object
arrays.
-
#state ⇒ Object
Returns the value of attribute state.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize ⇒ Issue
constructor
A new instance of Issue.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Issue
Returns a new instance of Issue.
18 19 20 21 |
# File 'lib/sleeping-wolf.rb', line 18 def initialize @comments = [] @labels = [] end |
Instance Attribute Details
#comments ⇒ Object
arrays
16 17 18 |
# File 'lib/sleeping-wolf.rb', line 16 def comments @comments end |
#date_opened ⇒ Object
Returns the value of attribute date_opened.
15 16 17 |
# File 'lib/sleeping-wolf.rb', line 15 def date_opened @date_opened end |
#id ⇒ Object
from octopi attr_accessor :repository, :user, :updated_at, :votes, :number, :title attr_accessor :body, :closed_at, :labels, :state, :created_at
14 15 16 |
# File 'lib/sleeping-wolf.rb', line 14 def id @id end |
#labels ⇒ Object
arrays
16 17 18 |
# File 'lib/sleeping-wolf.rb', line 16 def labels @labels end |
#state ⇒ Object
Returns the value of attribute state.
15 16 17 |
# File 'lib/sleeping-wolf.rb', line 15 def state @state end |
#title ⇒ Object
Returns the value of attribute title.
15 16 17 |
# File 'lib/sleeping-wolf.rb', line 15 def title @title end |
Instance Method Details
#to_s ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/sleeping-wolf.rb', line 23 def to_s s = "#{@title} (#{@state}) -- #{@date_opened.strftime '%Y-%m-%d'}" s << "\n\tlabels: #{@labels.join ', '}" @comments.each {|comment| s << "\n\t#{comment}"} return s end |