Class: Wlog::ArchiveIssues

Inherits:
Commandable show all
Defined in:
lib/wlog/commands/archive_issues.rb

Overview

Author:

  • Simon Symeonidis

Instance Method Summary collapse

Constructor Details

#initialize(issues) ⇒ ArchiveIssues

Returns a new instance of ArchiveIssues.



9
10
11
# File 'lib/wlog/commands/archive_issues.rb', line 9

def initialize(issues)
  @issues = issues
end

Instance Method Details

#executeObject

Update the issues to be marked as archived



14
15
16
17
18
19
# File 'lib/wlog/commands/archive_issues.rb', line 14

def execute
  @issues.each do |issue|
    issue.archive!
    issue.save
  end
end