Toplevel [] method for YAML?
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 597
- Forks
- 223
- Avg merge
- 11h 23m
- Merged PRs (30d)
- 3
Description
Would it be possible to alias YAML[] onto YAML.load_file()?
E. g.:
x = YAML.load_file('foobar.yml')
x = YAML['foobar.yml']
Rationale:
Laziness (or "user efficiency" - anything to type less, just as require 'pp' is no longer necessary. :D
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing YAML.load_file entry point and checking how YAML's top-level methods are defined. Confirm that YAML['foobar.yml'] should provide the same result as YAML.load_file('foobar.yml'), then add or update coverage for the requested alias.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby, yaml
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100