Conversation
Only used by the Finding state resources in tymly-core, which is where this code should have been all along.
The specification talks about Context Object, but we already referred to the input as ctx, the context. Consequently, in our code I'm referring to the ExecutionContext rather than the context object. It's not the greatest name, but hopefully it's different enough from our existing names to be clear.
Currently only support DayOfWeek property
Codecov Report
@@ Coverage Diff @@
## master #313 +/- ##
==========================================
+ Coverage 86.06% 87.66% +1.59%
==========================================
Files 35 36 +1
Lines 854 851 -3
==========================================
+ Hits 735 746 +11
+ Misses 119 105 -14
Continue to review full report at Codecov.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement the Context Object
The specification talks about Context Object, but we already referred to the input as
ctx, the context. Consequently, in our code I'm referring to the ExecutionContext rather than the Context Object. It's not the greatest name, but hopefully it's different enough from our existing names to be clear.The change is relatively small - we simply use the ExecutionContext when we're evaluating a state's inputs. We don't need it anywhere else. There's a small change to the argument parser to accommodate the
$$.pathconstruction, and an extra evaluation function, but that's about it.The ExecutionContext object provides a number of read-only properties, some of which it derives from the state's execution description.