Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📗 Table of Contents

📖 [Morse Code Decoder]

Morse Code Decoder This project deciphers messages encoded in Morse code using Ruby. It utilizes Ruby to build functions for interpreting single characters, complete words, and even entire messages.

Project Requirements

To successfully decode the Morse code messages, we will implement the following methods:

1. decode_char

  • This method takes a Morse code character as a string parameter.
  • It returns the corresponding uppercase alphabetic character.
  • Example: decode_char(".-") returns "A".

2. decode_word

  • This method takes a Morse code word as a string parameter.
  • It returns the string representation of the word, with each character separated by a single space.
  • Example: decode_word("-- -.--") returns "MY".

3. decode

  • This method takes a Morse code message as a string parameter.
  • It returns the string representation of the entire message, with each word separated by three spaces.
  • Example: decode("-- -.-- -. .- -- .") returns "MY NAME".

🛠 Built With

Ruby

Tech Stack

Ruby

Key Features

(back to top)

💻 Getting Started

To get started with decoding Morse code messages, follow these steps:

Prerequisites

Ensure you have the following installed:

  • Ruby programming language
  • IRB (Interactive Ruby)

Setup

  1. Clone this repository to your local machine: git clone https://github.com/your-username/morse-code-decoder.git

  2. Open your terminal and navigate to the project directory: cd morse-code-decoder

  3. Run IRB to access the Ruby interactive console: irb

  4. Load the Morse code decoder file in IRB require_relative 'morse_code_decoder'

  5. Now you can use the provided methods to decode Morse code messages. For example: decode_char(".-")

Output: "A"

decode_word("-- -.--")

Output: "MY"

decode("-- -.-- -. .- -- .")

Output: "MY NAME"

(back to top)

👥 Authors

👤 John Murianki

👤 MesakDuduCoder

(back to top)

🔭 Future Features

(back to top)

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

If you like this project, please give it a star, and if you would love to tell me ways to improve it, contact me on LinkedIn or Twitter. It will be a pleasure to hear from you.

(back to top)

🙏 Acknowledgments

I would like to thank Microverse (microverse.org) for providing the resources and the knowledge to work on projects like this.

(back to top)

❓ FAQ

  • How do I install Ruby?

You can download the latest version of Ruby from the official website: https://www.ruby-lang.org/en/downloads/

-Where can I learn the basics of Ruby?

Check out the Ruby documentation and tutorials at https://www.ruby-lang.org/en/documentation/ and https://www.ruby-lang.org/en/documentation/quickstart/

(back to top)

📝 License

This project is MIT licensed.

(back to top)

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages