Sha256: 98fa0ec7d27d55e02df6cb9467b966d59ca3a2327abb52010c03d6eff81359f1
Contents?: true
Size: 504 Bytes
Versions: 1
Compression:
Stored size: 504 Bytes
Contents
require 'wlog/commands/commandable' require 'wlog/domain/issue' module Wlog # Command for deleting issues # @author Simon Symeonidis class DeleteIssue # Init with the issue id def initialize(id) @issue_id = id @deleted = false end # delete the issue def execute issue = Issue.find(@issue_id) if issue issue.destroy @deleted = true end rescue ActiveRecord::RecordNotFound @deleted = false end def deleted? @deleted end attr :deleted end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wlog-1.2.2 | lib/wlog/commands/delete_issue.rb |