Skip to content

Commit

Permalink
There there
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlyobvious committed Nov 20, 2023
1 parent ccb7244 commit 8fcfb12
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions examples/extracted_state/lib/project_management/issue_state.rb
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
module ProjectManagement
class IssueState < Struct.new(:id, :status)
def initial?
status.nil?
end
def open?
status == :open
end

def closed?
status == :closed
end

def in_progress?
status == :in_progress
end

def reopened?
status == :reopened
end

def resolved?
status == :resolved
end
def initial? = status.nil?
def open? = status == :open
def closed? = status == :closed
def in_progress? = status == :in_progress
def reopened? = status == :reopened
def resolved? = status == :resolved

def apply(event)
case event
Expand Down

0 comments on commit 8fcfb12

Please sign in to comment.