Skip to content
/ morse Public

A library to encode, decode and play morse code

License

Notifications You must be signed in to change notification settings

wooster0/morse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

morse

A library to encode, decode and play morse code

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      morse:
        github: r00ster91/morse
  2. Run shards install

Usage

require "morse"

# Encode text to morse code:
morse_code = Morse.encode("hello") # => ".... . .-.. .-.. ---"

# Decode morse code to text:
Morse.decode(morse_code) # => "HELLO"

# Or play morse code: (this will play sounds)
Morse.play(morse_code)

Contributing

  1. Fork it (https://github.com/r00ster91/morse/fork)
  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 a new Pull Request

Contributors

Releases

No releases published

Packages

No packages published