Class: TemplateGem::NorrisIt

Inherits:
Object
  • Object
show all
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

Constructor Details

#initializeNorrisIt

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_nameObject



12
13
14
# File 'lib/template_gem.rb', line 12

def first_name
  "chuck"
end

#last_nameObject



15
16
17
# File 'lib/template_gem.rb', line 15

def last_name
  "norris"
end

#what_chuck_saysObject



19
20
21
# File 'lib/template_gem.rb', line 19

def what_chuck_says
  @chucks_lines[Random.rand*@chucks_lines.size]
end