The Greeter
class represents an object that knows how to greet
with a message in a certain language.
Public Class methods
new
(language, message)
Creates a new Greeter
instance. Don't call this method
directly; instead, use the GreeterFactory.create
factory method.
Parameters |
|
[show source]
# File src/models/greeter.rb, line 23 def initialize(language, message) @language = language @message = message end
Public Instance methods
to_s
()
Get a string containing the representation for this greeter object.
Returns |
This greeter's message as a string. |
[show source]
# File src/models/greeter.rb, line 32 def to_s @message.to_s end