https://github.com/nijens/range
Ruby range syntax parser for PHP.
https://github.com/nijens/range
php ruby-range-syntax yaml
Last synced: 3 months ago
JSON representation
Ruby range syntax parser for PHP.
- Host: GitHub
- URL: https://github.com/nijens/range
- Owner: nijens
- License: mit
- Created: 2016-09-17T10:03:41.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-21T14:46:31.000Z (almost 10 years ago)
- Last Synced: 2025-02-08T01:38:31.000Z (over 1 year ago)
- Topics: php, ruby-range-syntax, yaml
- Language: PHP
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Range
[![Latest version on Packagist][ico-version]][link-version]
[![Software License][ico-license]](LICENSE.md)
[![Build Status][ico-build]][link-build]
[![Coverage Status][ico-coverage]][link-coverage]
[![SensioLabsInsight][ico-insight]][link-insight]
[![StyleCI][ico-code-style]][link-code-style]
Ruby range syntax parser for PHP.
## Installation using Composer
Run the following command to add the package to the composer.json of your project:
``` bash
$ composer require nijens/range
```
## Usage
Parsing a range in Ruby syntax:
``` php
getFrom(); // Output: 0
echo $range->getTo(); // Output: 1
```
Converting a Range instance to Ruby range syntax:
``` php