module Xdite
Constants
- VERSION
Public Class Methods
apologize()
click to toggle source
# File lib/xdite.rb, line 20 def apologize '別人變造我的講法還甚至發明我沒講過的話。那我到底要對這些內容去道歉什麼?' end
debate()
click to toggle source
# File lib/xdite.rb, line 24 def debate ret = [] (rand(96) + 5).times{ ret << ['z', 'Z', '...'].sample } ret.join end
paragraph(n = 3, per_paragraph = 3)
click to toggle source
# File lib/xdite.rb, line 14 def paragraph n = 3, per_paragraph = 3 ret = [] n.to_i.times{ret << sentence(per_paragraph.to_i)} ret.join("\n\n") end
quotes()
click to toggle source
# File lib/xdite.rb, line 30 def quotes @quotes ||= File.readlines(File.expand_path('../xdite/quotes.txt', __FILE__)).map(&:strip) end
says(n = 1)
click to toggle source
per line
# File lib/xdite.rb, line 5 def says n = 1 quotes.sample(n.to_i).join($/) end
sentence(n = 1)
click to toggle source
inline
# File lib/xdite.rb, line 10 def sentence n = 1 quotes.sample(n.to_i).join end