Class: Pomo::GithubTask
Instance Attribute Summary collapse
-
#labels ⇒ Object
Labels array.
-
#number ⇒ Object
Issue number.
-
#project ⇒ Object
Project name.
-
#username ⇒ Object
Username.
Attributes inherited from Task
#complete, #description, #length, #name
Instance Method Summary collapse
-
#github? ⇒ Boolean
Check if the task is a github issue.
-
#initialize(name = nil, options = {}) ⇒ GithubTask
constructor
Initialize with name and options.
-
#uri ⇒ Object
Absolute URI to github issue.
Methods inherited from Task
Constructor Details
#initialize(name = nil, options = {}) ⇒ GithubTask
Initialize with name and options.
34 35 36 37 |
# File 'lib/pomo/github_task.rb', line 34 def initialize name = nil, = {} super .each { |k,v| send :"#{k}=", v } end |
Instance Attribute Details
#labels ⇒ Object
Labels array.
24 25 26 |
# File 'lib/pomo/github_task.rb', line 24 def labels @labels end |
#number ⇒ Object
Issue number.
29 30 31 |
# File 'lib/pomo/github_task.rb', line 29 def number @number end |
#project ⇒ Object
Project name.
19 20 21 |
# File 'lib/pomo/github_task.rb', line 19 def project @project end |
#username ⇒ Object
Username.
14 15 16 |
# File 'lib/pomo/github_task.rb', line 14 def username @username end |
Instance Method Details
#github? ⇒ Boolean
Check if the task is a github issue.
42 43 44 |
# File 'lib/pomo/github_task.rb', line 42 def github? true end |
#uri ⇒ Object
Absolute URI to github issue.
49 50 51 |
# File 'lib/pomo/github_task.rb', line 49 def uri "http://github.com/#{username}/#{project}/issues#issue/#{number}" end |