Sha256: b82d8ea92c0365a66eff40ef9a6bce4d370de1db4b3ed3cf0c05d596c587a129

Contents?: true

Size: 1.39 KB

Versions: 1

Compression:

Stored size: 1.39 KB

Contents

![travis](https://travis-ci.org/ericdke/NATOPhone.svg?branch=master)

[![Coverage Status](https://img.shields.io/coveralls/ericdke/NATOPhone.svg)](https://coveralls.io/r/ericdke/NATOPhone?branch=master)

# NATOPhone

Simple tool to encode/decode [NATO alphabet](https://en.wikipedia.org/wiki/NATO_phonetic_alphabet).

## Installation

### CLI

```raw
gem install natophone
```  

### Library

Add this line to your application's Gemfile:

```ruby
gem 'natophone'
```

And then execute:

`bundle`

## Usage

### CLI

```raw
natophone encode Hello world.
natophone -E Hello world.
natophone -E 'Hello world.' 'Goodbye!'
natophone -E --yell Hello world.
natophone -E --json Hello world.
natophone decode hotel echo lima lima oscar - whiskey oscar romeo lima delta stop
natophone -D hotel echo lima lima oscar - whiskey oscar romeo lima delta stop
natophone -D 'hotel echo lima lima oscar' 'whiskey oscar romeo lima delta stop'
natophone -D --yell hotel echo lima lima oscar
natophone -D --json hotel echo lima lima oscar
```  

### Library

```ruby
require 'natophone'
```  

```ruby
enc_by_string = NATOPhone::Encoder.new('hello world')
enc_by_array = NATOPhone::Encoder.new(['hello', 'world'])
```  

```ruby
dec_by_string = NATOPhone::Decoder.new('hotel echo lima lima oscar - whiskey oscar romeo lima delta')
dec_by_array = NATOPhone::Decoder.new(%w{hotel echo lima lima oscar - whiskey oscar romeo lima delta})
```  

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
natophone-0.0.3 README.md