Class: Faker::Games::Minecraft

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

.blockString

Produces the name of a block from Minecraft.

Examples:

Faker::Games::Minecraft.block #=> "Stone"

Returns:

  • (String)

Available since:

  • 2.13.0


16
17
18
# File 'lib/faker/games/minecraft.rb', line 16

def block
  fetch('games.minecraft.blocks')
end

.itemString

Produces the name of an item from Minecraft.

Examples:

Faker::Games::Minecraft.item #=> "Iron Shovel"

Returns:

  • (String)

Available since:

  • 2.13.0


29
30
31
# File 'lib/faker/games/minecraft.rb', line 29

def item
  fetch('games.minecraft.items')
end

.mobString

Produces the name of a mob from Minecraft.

Examples:

Faker::Games::Minecraft.item #=> "Sheep"

Returns:

  • (String)

Available since:

  • 2.13.0


42
43
44
# File 'lib/faker/games/minecraft.rb', line 42

def mob
  fetch('games.minecraft.mobs')
end