Class: Faker::Quotes::Shakespeare

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/quotes/shakespeare.rb

Constant Summary

Constants inherited from Base

Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters

Class Method Summary collapse

Methods inherited from Base

bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, translate, unique, with_locale

Class Method Details

.as_you_like_itObject


63
64
65
# File 'lib/faker/quotes/shakespeare.rb', line 63

def as_you_like_it
  fetch('shakespeare.as_you_like_it')
end

.as_you_like_it_quoteString

Produces a Shakespeare quote from As You Like It.

Examples:

Faker::Quotes::Shakespeare.as_you_like_it_quote # => "Can one desire too much of a good thing?."

Returns:

  • (String)

Available since:

  • 1.9.2


29
30
31
# File 'lib/faker/quotes/shakespeare.rb', line 29

def as_you_like_it_quote
  sample(as_you_like_it)
end

.hamletObject


59
60
61
# File 'lib/faker/quotes/shakespeare.rb', line 59

def hamlet
  fetch('shakespeare.hamlet')
end

.hamlet_quoteString

Produces a Shakespeare quote from Hamlet.

Examples:

Faker::Quotes::Shakespeare.hamlet_quote # => "To be, or not to be: that is the question."

Returns:

  • (String)

Available since:

  • 1.9.2


16
17
18
# File 'lib/faker/quotes/shakespeare.rb', line 16

def hamlet_quote
  sample(hamlet)
end

.king_richard_iiiObject


67
68
69
# File 'lib/faker/quotes/shakespeare.rb', line 67

def king_richard_iii
  fetch('shakespeare.king_richard_iii')
end

.king_richard_iii_quoteString

Produces a Shakespeare quote from King Richard III.

Examples:

Faker::Quotes::Shakespeare.king_richard_iii_quote # => "Now is the winter of our discontent."

Returns:

  • (String)

Available since:

  • 1.9.2


42
43
44
# File 'lib/faker/quotes/shakespeare.rb', line 42

def king_richard_iii_quote
  sample(king_richard_iii)
end

.romeo_and_julietObject


71
72
73
# File 'lib/faker/quotes/shakespeare.rb', line 71

def romeo_and_juliet
  fetch('shakespeare.romeo_and_juliet')
end

.romeo_and_juliet_quoteString

Produces a Shakespeare quote from Romeo And Juliet.

Examples:

Faker::Quotes::Shakespeare.romeo_and_juliet_quote # => "O Romeo, Romeo! wherefore art thou Romeo?."

Returns:

  • (String)

Available since:

  • 1.9.2


55
56
57
# File 'lib/faker/quotes/shakespeare.rb', line 55

def romeo_and_juliet_quote
  sample(romeo_and_juliet)
end