Class: Faker::JapaneseMedia::KamenRider
- 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
-
.collectible_device(*eras) ⇒ String
Produces the name of a collectible device from a Kamen Rider series.
- .eras=(new_eras) ⇒ Object
-
.kamen_rider(*eras) ⇒ String
Produces the name of a Kamen Rider from a series in the given era.
-
.series(*eras) ⇒ String
Produces the name of a Kamen Rider series.
-
.transformation_device(*eras) ⇒ String
Produces the name of a transformation device used by a Kamen Rider from the given eras.
-
.user(*eras) ⇒ String
Produces the name of a main user of Kamen Rider.
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.
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.
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.
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”
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.
36 37 38 |
# File 'lib/faker/japanese_media/kamen_rider.rb', line 36 def user(*eras) from_eras(*eras, field: :users) end |