Class: Foghorn::Exceptions::Base

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

Class Method Summary collapse

Class Method Details

.phraseObject



7
8
9
# File 'lib/foghorn/exceptions/base.rb', line 7

def self.phrase
  self.phrases.sample
end

.phrasesObject



2
3
4
5
# File 'lib/foghorn/exceptions/base.rb', line 2

def self.phrases
  phrase_path = File.join(File.dirname(__FILE__), '..', 'inc', 'phrases.txt')
  File.readlines(phrase_path).map(&:rstrip)
end