Sha256: 471d9160129d147e459171fe86f6c4486ef949bb15ae091f6ad1c5977e8a4cef

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

# Cellularity 

Determine whether a value is an ICCID, IMEI, or ESN.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'cellularity'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install cellularity

## Usage

#### Currently, Cellularity can handle ESNs, ICCIDs, and IMEIs.

```ruby
imei = 123456789012345       # It can be a string or a number
esn = '0xabc12345'           # The ESN class can also handle hex.
iccid = 12345678901234567890
min = 1234567890

## Validate your values:
Cellularity::Esn.new(esn).valid?     # => true
Cellularity::Esn.new(imei).valid?    # => false
Cellularity::Iccid.new(iccid).valid? # => true
Cellularity::Min.new(min).valid?     # => true
Cellularity::Min.new(:invalid).valid?   # => false

# Dynamically determine your id type:
Cellularity.determine_id_type(esn)   # => :esn
Cellularity.determine_id_type(iccid) # => :iccid
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cellularity-1.0.0 README.md