Skip to content

dorianmariecom/dorian-yaml-deep-map

Repository files navigation

dorian-yaml-deep-map

Recursively map a YAML value with a Ruby snippet.

Install

gem install dorian-yaml-deep-map

Also included in the aggregate gem:

gem install dorian

Usage

yaml-deep-map [file ...] "ruby code"

Run yaml-deep-map -h for generated option details and yaml-deep-map -v for the installed version.

Notes

  • Mutate or replace it in the snippet; the final YAML is printed.

Examples

Increment every integer

printf -- '- 1\n- 2\n' | yaml-deep-map "it += 1 if it.is_a?(Integer)"

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors