Sha256: 5eced14177fd5a5af76cca9e9a9e1dd70d13fc3deb2cf97ce17db7fc27bec7a3

Contents?: true

Size: 1.17 KB

Versions: 1

Compression:

Stored size: 1.17 KB

Contents

# unicode-version [![[version]](https://badge.fury.io/rb/unicode-version.svg)](https://badge.fury.io/rb/unicode-version)  [![[travis]](https://travis-ci.org/janlelis/unicode-version.svg)](https://travis-ci.org/janlelis/unicode-version)

Makes it easy to check for Unicode and Emoji support of your current Ruby (and older Rubies)

## Setup

Add to your `Gemfile`:

```ruby
gem "unicode-version"
```

## Usage

```ruby
# Returns current Unicode version (example with Ruby 2.7.0)
Unicode::Version.unicode_version # => 12.1

# Returns Unicode version of older Rubies
Unicode::Version.unicode_version "2.6.2" # => 12.0.0
Unicode::Version.unicode_version 1.9 # => 5.2.0

# Returns nil when Ruby version too old (before 1.9)
Unicode::Version.unicode_version 1.8 # => nil

# Returns current Emoji version (example with Ruby 2.7.0)
Unicode::Version.emoji_version # => 12.1

# Returns Emoji version of older Rubies
Unicode::Version.emoji_version "2.6.2" # => 12.0
Unicode::Version.emoji_version 2.5 # => 5.0

# Returns nil when Ruby version too old (before 2.5)
Unicode::Version.emoji_version 2.4 # => nil
```

## MIT License

Copyright (C) 2020 Jan Lelis <https://janlelis.com>. Released under the MIT license.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
unicode-version-1.0.0 README.md