jj.github.io/curso-tdd/temas/diseño
class Project:
def __init__(self, name ):
self.name = name
def name(self):
return self.name
enum IssueState <Open Closed>;
unit class Project::Issue;
has IssueState $!state = Open;
has Str $!project-name;
has UInt $!issue-id;
multi submethod BUILD( UInt :$!issue-id!,
Str :$!project-name!) {}
method close() { $!state = Closed }
method reopen() { $!state = Open }