Module: Vainglory
- Defined in:
- lib/vainglory.rb,
lib/vainglory/hero.rb,
lib/vainglory/version.rb
Defined Under Namespace
Classes: Hero, HeroNameError
Constant Summary collapse
- VERSION =
"0.0.1"
Class Attribute Summary collapse
-
.heroes ⇒ Object
Returns the value of attribute heroes.
Class Method Summary collapse
Class Attribute Details
.heroes ⇒ Object
Returns the value of attribute heroes.
8 9 10 |
# File 'lib/vainglory.rb', line 8 def heroes @heroes end |
Class Method Details
.hero(name = nil) ⇒ Object
10 11 12 13 14 |
# File 'lib/vainglory.rb', line 10 def hero(name = nil) @heroes.fetch(name) rescue KeyError raise HeroNameError, 'Invalid hero name' end |