Class: Faker::Science

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/default/science.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

.elementString

Produces the name of a element.

Examples:

Faker::Science.element #=> "Carbon"

Returns:



15
16
17
# File 'lib/faker/default/science.rb', line 15

def element
  fetch('science.element')
end

.element_symbolString

Produces the symbol of an element.

Examples:

Faker::Science.element_symbol #=> "Pb"

Returns:



28
29
30
# File 'lib/faker/default/science.rb', line 28

def element_symbol
  fetch('science.element_symbol')
end

.scientistString

Produces the name of a scientist.

Examples:

Faker::Science.scientist #=> "Isaac Newton"

Returns:



41
42
43
# File 'lib/faker/default/science.rb', line 41

def scientist
  fetch('science.scientist')
end