Class: Todoplicator::GitHubAdapter
- Inherits:
-
Object
- Object
- Todoplicator::GitHubAdapter
- Defined in:
- lib/todoplicator/git_hub_adapter.rb
Defined Under Namespace
Classes: Issue
Instance Method Summary collapse
- #create_issue(issue) ⇒ Object
- #find_issues ⇒ Object
-
#initialize(target) ⇒ GitHubAdapter
constructor
A new instance of GitHubAdapter.
Constructor Details
#initialize(target) ⇒ GitHubAdapter
Returns a new instance of GitHubAdapter.
37 38 39 |
# File 'lib/todoplicator/git_hub_adapter.rb', line 37 def initialize(target) @target = target end |
Instance Method Details
#create_issue(issue) ⇒ Object
45 46 47 48 49 |
# File 'lib/todoplicator/git_hub_adapter.rb', line 45 def create_issue(issue) new_issue = Issue.new(client.create_issue(@target, issue.title, issue.body)) new_issue = Issue.new(client.close_issue(@target, new_issue.raw.number)) if issue.closed? new_issue end |