Class: Talking::Mouth

Inherits:
Struct
  • Object
show all
Defined in:
lib/talking.rb

Overview

Public: Your program should use mouth to speak stuff. Give him this ones.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#debug_voiceObject

Returns the value of attribute debug_voice

Returns:

  • (Object)

    the current value of debug_voice



24
25
26
# File 'lib/talking.rb', line 24

def debug_voice
  @debug_voice
end

#natural_voiceObject

Returns the value of attribute natural_voice

Returns:

  • (Object)

    the current value of natural_voice



24
25
26
# File 'lib/talking.rb', line 24

def natural_voice
  @natural_voice
end

Instance Method Details

#debug(msg, *args) ⇒ Object

Public: Debug information print. Uses secondary, debug voice output.



31
32
33
# File 'lib/talking.rb', line 31

def debug(msg, *args)
  debug_voice.puts("DEBUG: #{msg}", *args)
end

#say(msg, *args) ⇒ Object

Public: Says simple stuff with formatted parameters.



26
27
28
# File 'lib/talking.rb', line 26

def say(msg, *args)
  natural_voice.puts(msg, *args)
end