Class: Checklister::Issue

Inherits:
Object
  • Object
show all
Defined in:
lib/checklister/issue.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Issue

Returns a new instance of Issue.



8
9
10
11
12
# File 'lib/checklister/issue.rb', line 8

def initialize(attributes = {})
  @project_id  = attributes.fetch(:project_id) { raise ArgumentError, "Missing project_id" }
  @title       = attributes.fetch(:title) { raise ArgumentError, "Missing title" }
  @description = attributes.fetch(:body) { raise ArgumentError, "Missing description" }
end

Instance Attribute Details

#descriptionObject (readonly)

  • project_id (required) - The ID of a project
  • title (required) - The title of an issue
  • description (required) - The description of an issue


6
7
8
# File 'lib/checklister/issue.rb', line 6

def description
  @description
end

#project_idObject (readonly)

  • project_id (required) - The ID of a project
  • title (required) - The title of an issue
  • description (required) - The description of an issue


6
7
8
# File 'lib/checklister/issue.rb', line 6

def project_id
  @project_id
end

#titleObject (readonly)

  • project_id (required) - The ID of a project
  • title (required) - The title of an issue
  • description (required) - The description of an issue


6
7
8
# File 'lib/checklister/issue.rb', line 6

def title
  @title
end