Skip to content

Commit

Permalink
Make transition-supply a multi for Tinky::DB
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanstowe committed Apr 29, 2021
1 parent 9a67e7d commit 8acb5c2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
v0.1.3 Thu 29 Apr 07:57:17 BST 2021
* Make more multi on Workflow for convenience of sub-classes
v0.1.2 Mon 19 Apr 14:44:33 BST 2021
* Add some lifecycle callbacks to the object for the convenience of sub-classes
* Fix the application of the role
Expand Down
4 changes: 2 additions & 2 deletions META6.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "Tinky",
"version": "0.1.2",
"version": "0.1.3",
"auth": "github:jonathanstowe",
"api": "1.0",
"description": "An Experimental Workflow / State Management toolit",
"description": "An Experimental Workflow / State Management toolkit",
"source-url": "https://github.com/jonathanstowe/Tinky.git",
"support": {
"email": "jns+git@gellyfish.co.uk",
Expand Down
4 changes: 2 additions & 2 deletions lib/Tinky.pm
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ current state on the object.
=end pod

module Tinky:ver<0.1.2>:auth<github:jonathanstowe>:api<1.0> {
module Tinky:ver<0.1.3>:auth<github:jonathanstowe>:api<1.0> {

# Stub here, definition below
class State { ... };
Expand Down Expand Up @@ -1106,7 +1106,7 @@ module Tinky:ver<0.1.2>:auth<github:jonathanstowe>:api<1.0> {
}

has Supply $!transition-supply;
method transition-supply( --> Supply ) {
multi method transition-supply( --> Supply ) {
$!transition-supply //= do {
my @supplies = self.transitions.Seq.map( -> $transition { $transition.supply.map(-> $value { $transition, $value }) });
Supply.merge(@supplies);
Expand Down

0 comments on commit 8acb5c2

Please sign in to comment.