Module: FandomWord
- Defined in:
- lib/fandom_word.rb,
lib/fandoms.rb,
lib/version.rb,
lib/fandom_word_catalog.rb
Overview
Holds all classes and methods for Fandom Word
Defined Under Namespace
Modules: Fandoms Classes: FandomRandomizer, FandomWordCatalog
Constant Summary collapse
- VERSION =
Version of this gem
'0.4.0'.freeze
Class Method Summary collapse
-
.fandoms ⇒ Object
Returns the list of fandoms (categories).
-
.random_word(fandom_name_or_names = nil) ⇒ String
Returns random word from any fandom in catalog.
Class Method Details
.fandoms ⇒ Object
Returns the list of fandoms (categories)
19 20 21 |
# File 'lib/fandom_word.rb', line 19 def fandoms FandomRandomizer.instance.available_fandoms end |
.random_word(fandom_name_or_names = nil) ⇒ String
Returns random word from any fandom in catalog. Fandom category can be specified.
10 11 12 13 14 15 16 |
# File 'lib/fandom_word.rb', line 10 def random_word(fandom_name_or_names = nil) if fandom_name_or_names FandomRandomizer.instance.random_word fandom_name_or_names else FandomRandomizer.instance.random_word end end |