module Quotes
Constants
- BASE_URL
Public Class Methods
qod(author: false)
click to toggle source
# File lib/quotes.rb, line 6 def qod(author: false) res = HTTParty.get(BASE_URL + '/qod') return '' unless res.code == 200 quote = ['contents']['quotes'][0] "#{quote['quote']}#{'\n- ' + quote['author'] if author}" end
Private Instance Methods
qod(author: false)
click to toggle source
# File lib/quotes.rb, line 6 def qod(author: false) res = HTTParty.get(BASE_URL + '/qod') return '' unless res.code == 200 quote = ['contents']['quotes'][0] "#{quote['quote']}#{'\n- ' + quote['author'] if author}" end