Class: Faker::JapaneseMedia::KamenRider

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/japanese_media/kamen_rider.rb

Defined Under Namespace

Classes: UnavailableInEra

Constant Summary collapse

ERAS =
%i[showa heisei reiwa].freeze

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, generate, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, shuffle!, translate, unique, with_locale

Class Method Details

.collectible_device(*eras) ⇒ String

Produces the name of a collectible device from a Kamen Rider series.

Examples:

Faker::JapaneseMedia::KamenRider.collectible_device #=> "Vistamp"

Returns:

  • (String)

Available since:

  • next



62
63
64
# File 'lib/faker/japanese_media/kamen_rider.rb', line 62

def collectible_device(*eras)
  from_eras(*eras, field: :collectible_devices) { |e| e.delete(:showa) }
end

.eras=(new_eras) ⇒ Object



9
10
11
12
# File 'lib/faker/japanese_media/kamen_rider.rb', line 9

def eras=(new_eras)
  selected_eras = ERAS & new_eras
  @eras = selected_eras.empty? ? ERAS : selected_eras
end

.kamen_rider(*eras) ⇒ String

Produces the name of a Kamen Rider from a series in the given era.

Examples:

Faker::JapaneseMedia::KamenRider.kamen_rider #=> "Kamen Rider Revice"

Returns:

  • (String)

Available since:

  • next



23
24
25
# File 'lib/faker/japanese_media/kamen_rider.rb', line 23

def kamen_rider(*eras)
  from_eras(*eras, field: :kamen_riders)
end

.series(*eras) ⇒ String

Produces the name of a Kamen Rider series.

Examples:

Faker::JapaneseMedia::KamenRider.series #=> "Kamen Rider Revice"

Returns:

  • (String)

Available since:

  • next



49
50
51
# File 'lib/faker/japanese_media/kamen_rider.rb', line 49

def series(*eras)
  from_eras(*eras, field: :series)
end

.transformation_device(*eras) ⇒ String

Produces the name of a transformation device used by a Kamen Rider from the given eras.

“Revice Driver”

Examples:

Faker::JapaneseMedia::KamenRider.transformation_device #=>

Returns:

  • (String)

Available since:

  • next



75
76
77
# File 'lib/faker/japanese_media/kamen_rider.rb', line 75

def transformation_device(*eras)
  from_eras(*eras, field: :transformation_devices)
end

.user(*eras) ⇒ String

Produces the name of a main user of Kamen Rider.

Examples:

Faker::JapaneseMedia::KamenRider.user #=> "Ikki Igarashi"

Returns:

  • (String)

Available since:

  • next



36
37
38
# File 'lib/faker/japanese_media/kamen_rider.rb', line 36

def user(*eras)
  from_eras(*eras, field: :users)
end