Module: Reality::Names
- Defined in:
- lib/reality/names.rb
Overview
This optional and higly experimental module allows treat ALL objects
available with Reality, as Ruby constants (via redefined const_missing
).
This practice may seem questionable, so use it wisely!
You can just use this module on its own:
Reality::Names::Argentina
# => #<Reality::Entity(Argentina):country>
...Or just include it elsewhere:
include Reality::Names
Argentina
# => #<Reality::Entity(Argentina):country>
Multi-word entities can also be called:
BuenosAires
# => #<Reality::Entity(Buenos Aires):city>
Though, more complicated entity names (with punctuations) can't be accessed this way.