An open API service indexing awesome lists of open source software.

https://github.com/melashu/time_greeting_message

This is a simple gem to display a message with the phrase `Good Morning` if it is in the morning, `Good Afternoon` if it is in the afternoon, `Good Evening` if it is in the evening, `Good Night` if it is at night
https://github.com/melashu/time_greeting_message

ruby

Last synced: about 1 year ago
JSON representation

This is a simple gem to display a message with the phrase `Good Morning` if it is in the morning, `Good Afternoon` if it is in the afternoon, `Good Evening` if it is in the evening, `Good Night` if it is at night

Awesome Lists containing this project

README

          

# 📗 Table of Contents

- [📗 Table of Contents](#-table-of-contents)
- [📖 time\_greeting\_message ](#-time_greeting_message-)
- [Installation ](#installation-)
- [Usage](#usage)
- [👥 Authors ](#-authors-)
- [🤝 Contributing ](#-contributing-)
- [⭐️ Show your support ](#️-show-your-support-)

# 📖 time_greeting_message

This is a simple gem to display a message with the phrase `Good Morning` if it is in the morning, `Good Afternoon` if it is in the afternoon, `Good Evening` if it is in the evening, `Good Night` if it is at night

## Installation

Add the following code to you Gemfile

```
gem 'time_greeting_message'
```
or

install the gem on your terminal

```
gem install time_greeting_message
```

### Usage

`require` the gem in your ruby code.

For example you can do this on your employee.rb file

```

require 'time_greeting_message'
class Employee

def welcome(full_name)
"#{Greeting.new.greeting_message} #{full_name}"
end

end

employee = Employee.new
puts employee.welcome("Melashu Amare)
```

The above code will display either of the message below, based on the curent time.

`Good Morning Melashu Amare`

`Good Afternoon Melashu Amare`

`Good Evening Melashu Amare`

`Good Night Melashu Amare`

## 👥 Authors

👤 Melashu Amare

- GitHub: [@melashu](https://github.com/melashu)
- Twitter: [@meshu102](https://twitter.com/meshu102)
- LinkedIn: [Melashu Amare](https://www.linkedin.com/in/melashu-amare/)

## 🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page.](https://github.com/melashu/time_greeting_message/issues)

## ⭐️ Show your support

Give a star if you like this project!

(back to top)