Class: Pomo::GithubTask

Inherits:
Task
  • Object
show all
Defined in:
lib/pomo/github_task.rb

Instance Attribute Summary collapse

Attributes inherited from Task

#complete, #description, #length, #name

Instance Method Summary collapse

Methods inherited from Task

#complete?, #start, #to_s

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, options = {}
  super
  options.each { |k,v| send :"#{k}=", v }
end

Instance Attribute Details

#labelsObject

Labels array.



24
25
26
# File 'lib/pomo/github_task.rb', line 24

def labels
  @labels
end

#numberObject

Issue number.



29
30
31
# File 'lib/pomo/github_task.rb', line 29

def number
  @number
end

#projectObject

Project name.



19
20
21
# File 'lib/pomo/github_task.rb', line 19

def project
  @project
end

#usernameObject

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.

Returns:

  • (Boolean)


42
43
44
# File 'lib/pomo/github_task.rb', line 42

def github?
  true
end

#uriObject

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