Class: TemplateGem::NorrisIt
- Inherits:
-
Object
- Object
- TemplateGem::NorrisIt
- Defined in:
- lib/template_gem.rb
Overview
You should have at least one class in your module. This one tells you something about Chuck Norris.
Instance Method Summary collapse
- #first_name ⇒ Object
-
#initialize ⇒ NorrisIt
constructor
A new instance of NorrisIt.
- #last_name ⇒ Object
- #what_chuck_says ⇒ Object
Constructor Details
#initialize ⇒ NorrisIt
Returns a new instance of NorrisIt.
7 8 9 10 |
# File 'lib/template_gem.rb', line 7 def initialize @chucks_lines=%w( When\ Alexander\ Bell\ invented\ the\ telephone\ he\ had\ 3\ missed\ calls\ from\ Chuck. Chuck\ Norris\ doesn't\ call\ the\ wrong\ number.\ You\ answer\ the\ wrong\ phone. Chuck\ Norris\ died\ twenty\ years\ ago\ but\ Death\ doesn't\ have\ the\ guts\ to\ tell\ him.) end |
Instance Method Details
#first_name ⇒ Object
12 13 14 |
# File 'lib/template_gem.rb', line 12 def first_name "chuck" end |
#last_name ⇒ Object
15 16 17 |
# File 'lib/template_gem.rb', line 15 def last_name "norris" end |
#what_chuck_says ⇒ Object
19 20 21 |
# File 'lib/template_gem.rb', line 19 def what_chuck_says @chucks_lines[Random.rand*@chucks_lines.size] end |