0.01
No release in over 3 years
Low commit activity in last 3 years
dharma_quotes is a cheerful library of quotes from Buddhist texts. It provides functionality to run methods that return random quotes from the Dharma.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.7
 Project Readme

Dharma Quotes 1.2.0

Welcome to the new version of the gem, complete with RuboCop and the Dalai Lama!:monkey: :heart::skull: :fire: Thank you to all our Hacktoberfest 2020 contributors!

Well namaste, it's the Ruby library of Dharma quotes! ❤️

New in this version:

  • Functionality to get random quotes from the one and only Pema Chodron
  • More unit tests added
  • Contributing instructions added

How to Install 💻

In your command line, run the following command:

gem install dharma_quotes

Usage

You can start using dharma_quotes with just a few lines of Ruby. In your Ruby file, type the following:

require 'dharma_quotes'

dharma_quotes = DharmaQuotes.new
random_quote = dharma_quotes.get_quote
puts random_quote

It's going to give you a quote for example:

Animosity does not eradicate animosity. 
Only by loving kindness is animosity dissolved. 
This law is ancient and eternal. - The Dhammapada'

You can be more specific too if you like! Ask for a quote from the Dhammapada; a quote from a miscellaneous source; or another option detailed below.

dhammapada_quote = dharma_quotes.get_dhammapada_quote
misc_quote = dharma_quotes.get_quote_from_other_texts
noble_truth = dharma_quotes.get_noble_truth
part_of_noble_eightfold_path = dharma_quotes.get_part_of_eightfold_path
pema_chodron_quote = dharma_quotes.get_pema_chodron_quote
dalai_lama_quote = dharma_quotes.get_dalai_lama_quote

From command line

$> quote

Contributing 🤝

See 'CONTRIBUTING.md' for instructions.

Enjoy life!