class DharmaQuotes

Public Class Methods

new() click to toggle source
# File lib/dharma_quotes.rb, line 11
def initialize
    @dhammapada_quotes = Dhammapada.new.quotes
    @other_texts_quotes = OtherTexts.new.quotes
    @four_noble_truths = FourNobleTruths.new.quotes
    @parts_of_eightfold_path = NobleEightfoldPath.new.quotes
    @pema_chodron_quotes = PemaChodronBooks.new.quotes
    @dalai_lama_quotes = DalaiLama.new.quotes
end

Public Instance Methods

get_dalai_lama_quote() click to toggle source
# File lib/dharma_quotes.rb, line 53
def get_dalai_lama_quote
    @dalai_lama_quotes.sample
end
get_dhammapada_quote() click to toggle source
# File lib/dharma_quotes.rb, line 33
def get_dhammapada_quote
    @dhammapada_quotes.sample
end
get_noble_truth() click to toggle source
# File lib/dharma_quotes.rb, line 45
def get_noble_truth
    @four_noble_truths.sample
end
get_part_of_eightfold_path() click to toggle source
# File lib/dharma_quotes.rb, line 41
def get_part_of_eightfold_path
    @parts_of_eightfold_path.sample
end
get_pema_chodron_quote() click to toggle source
# File lib/dharma_quotes.rb, line 49
def get_pema_chodron_quote
    @pema_chodron_quotes.sample
end
get_quote() click to toggle source
# File lib/dharma_quotes.rb, line 20
def get_quote
    all_quotes = [
      @dhammapada_quotes,
      @other_texts_quotes,
      @four_noble_truths,
      @parts_of_eightfold_path,
      @pema_chodron_quotes,
      @dalai_lama_quotes
    ].flatten

    all_quotes.sample
end
get_quote_from_other_texts() click to toggle source
# File lib/dharma_quotes.rb, line 37
def get_quote_from_other_texts
    @other_texts_quotes.sample
end