Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/byroot/parsr
https://github.com/byroot/parsr
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/byroot/parsr
- Owner: byroot
- License: mit
- Created: 2011-11-13T22:58:21.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2012-01-03T16:27:37.000Z (almost 13 years ago)
- Last Synced: 2024-12-15T07:41:52.141Z (12 days ago)
- Language: Ruby
- Homepage:
- Size: 133 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Parsr
Parsr aim to provide a way to safely evaluate a ruby expression composed only with literals,
just as Python's [ast.literal_eval](http://docs.python.org/library/ast.html#ast.literal_eval).## Example
```ruby
Parsr.literal_eval(%q{ [1, "2", 3.4 => 5..6, foo: [7, bar: /(bb|[^b]{2})/ix] ] })
```[![Build Status](https://secure.travis-ci.org/byroot/parsr.png)](http://travis-ci.org/byroot/parsr)