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 = {}) ⇒ Object

Initialize an instance of Issue

Parameters:

  • attributes (Hash) (defaults to: {})

    list of key/values



15
16
17
18
19
# File 'lib/checklister/issue.rb', line 15

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)

description (required) - The description of an issue



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

def description
  @description
end

#project_idObject (readonly)

project_id (required) - The ID of a project



4
5
6
# File 'lib/checklister/issue.rb', line 4

def project_id
  @project_id
end

#titleObject (readonly)

title (required) - The title of an issue



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

def title
  @title
end