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_itString

Generates quote from 'As you like it!'

Examples:

Faker::Quotes::Shakespeare.as_you_like_it   #=> "How bitter a thing it is to look into happiness through another man's eyes!"

Returns:

  • (String)

Available since:

  • 1.9.2


81
82
83
# File 'lib/faker/quotes/shakespeare.rb', line 81

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

.hamletString

Generates quote from Hamlet

Examples:

Faker::Quotes::Shakespeare.hamlet   #=> "A little more than kin, and less than kind."

Returns:

  • (String)

Available since:

  • 1.9.2


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

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_iiiString

Returns quote from 'King Rechard III'

Examples:

Faker::Quotes::Shakespeare  #=> "The king's name is a tower of strength."

Returns:

  • (String)

92
93
94
# File 'lib/faker/quotes/shakespeare.rb', line 92

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_julietString

Quote from 'Romeo and Juliet'

Examples:

Faker::Quotes::Shakespeare.romeo_and_juliet  #=> "Wisely and slow; they stumble that run fast."

Returns:

  • (String)

Available since:

  • 1.9.2


105
106
107
# File 'lib/faker/quotes/shakespeare.rb', line 105

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