Help please?


#1

here my code :

my_message = Message.new(from,to)


#2

Please what exactly is the question?

Please posting well formatted code and error or what you intend to achieve will make it easy.

Thanks!


#3

Forge an Object in the Fires of Mount Ruby.
Actually i dont understand how to store the result in my_message.


#4

After your class, create a variable called my_message.
Create an instance of your Message class using Message.new with whatever from and to arguments you want! Store the result in my_message.

here my code :slight_smile:
class Message
my message=Message.new (from,to)


#5

If I get you well enough, to create a Message class, you need to do this:

class Message
    def initialize(from, to)
        @from = from
        @to = to
    end
end

But to then create an instance using Message.new and store in my_message, you do this:

my_message = Message.new("Lagos", "Abuja")

Hope this helps! :slight_smile: