Class: Dude::ProjectManagement::Entities::Issue

Inherits:
Object
  • Object
show all
Defined in:
lib/dude/project_management/entities/issue.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Issue

Returns a new instance of Issue.



9
10
11
12
13
14
15
16
# File 'lib/dude/project_management/entities/issue.rb', line 9

def initialize(params)
  @id = params[:id]
  @title = params[:title]
  @description = params[:description]
  @status = params[:status]
  @assignee = params[:assignee]
  @url = params[:url]
end

Instance Attribute Details

#assigneeObject

Returns the value of attribute assignee.



7
8
9
# File 'lib/dude/project_management/entities/issue.rb', line 7

def assignee
  @assignee
end

#descriptionObject

Returns the value of attribute description.



7
8
9
# File 'lib/dude/project_management/entities/issue.rb', line 7

def description
  @description
end

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/dude/project_management/entities/issue.rb', line 7

def id
  @id
end

#statusObject

Returns the value of attribute status.



7
8
9
# File 'lib/dude/project_management/entities/issue.rb', line 7

def status
  @status
end

#titleObject

Returns the value of attribute title.



7
8
9
# File 'lib/dude/project_management/entities/issue.rb', line 7

def title
  @title
end

#urlObject

Returns the value of attribute url.



7
8
9
# File 'lib/dude/project_management/entities/issue.rb', line 7

def url
  @url
end

Instance Method Details

#done?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/dude/project_management/entities/issue.rb', line 34

def done?
  status == DONE_LIST_NAME
end

#in_progress?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/dude/project_management/entities/issue.rb', line 22

def in_progress?
  status == IN_PROGRESS_LIST_NAME
end

#ready_for_review?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/dude/project_management/entities/issue.rb', line 26

def ready_for_review?
  status == CODE_REVIEW_LIST_NAME
end

#testable?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/dude/project_management/entities/issue.rb', line 30

def testable?
  status == TESTING_LIST_NAME
end

#todo?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/dude/project_management/entities/issue.rb', line 18

def todo?
  [TODO_LIST_NAME, 'Unclear'].include? status
end