📗 Table of Contents
- 📗 Table of Contents
- 📖 time_greeting_message
- Installation
- Usage
- 👥 Authors
- 🤝 Contributing
- ⭐️ Show your support
- Installation
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
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
👤 Melashu Amare
- GitHub: @melashu
- Twitter: @meshu102
- LinkedIn: Melashu Amare
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a star if you like this project!
(back to top)