Class: PeepShow::Exceptions::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/peep-show/exceptions/base.rb

Class Method Summary collapse

Class Method Details

.phraseObject



8
9
10
# File 'lib/peep-show/exceptions/base.rb', line 8

def self.phrase
  self.phrases.sample
end

.phrasesObject



2
3
4
5
6
# File 'lib/peep-show/exceptions/base.rb', line 2

def self.phrases
  mark_path = File.join(File.dirname(__FILE__), '..', 'inc', 'mark.txt')
  jez_path = File.join(File.dirname(__FILE__), '..', 'inc', 'jez.txt')
  File.readlines(mark_path).map(&:rstrip).concat File.readlines(jez_path)
end