Class: Checklister::Github::Issue

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Issue

Returns a new instance of Issue.



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

def initialize(client)
  @client = client
end

Instance Method Details

#create(project_id, attributes = {}) ⇒ Object



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

def create(project_id, attributes = {})
  issue = Checklister::Issue.new(attributes.merge(project_id: project_id))
  @client.create_issue(issue.project_id, issue.title, issue.description)
end