Skip to content

Implement string concat in YAML syntax #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
szivkovicx opened this issue Feb 20, 2023 · 0 comments
Open

Implement string concat in YAML syntax #4

szivkovicx opened this issue Feb 20, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@szivkovicx
Copy link
Member

szivkovicx commented Feb 20, 2023

Implement first YAML function for KitBuilder for string concat. Requirements:

  • Function tag name: !join
  • Every YAML function should be represented in a class
  • Every class for YAML function should start with YAML...

Example:

class YAMLJoinFunction(yaml.YAMLObject):
    yaml_loader = yaml.SafeLoader
    yaml_tag = '!join'

    @classmethod
    def from_yaml(cls, loader, node):
        return functools.reduce(lambda a, b: a.value + b.value, node.value)
@szivkovicx szivkovicx self-assigned this Feb 20, 2023
@szivkovicx szivkovicx added the enhancement New feature or request label Feb 20, 2023
@szivkovicx szivkovicx added this to the v0.0.2 milestone Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant