Pass array methods for

  • Thread starter Edipofederle Edipofederle
  • Start date
E

Edipofederle Edipofederle

Hello I am looking to do a class with two methods, a push and a pop, how
do I define the methods for receiving the "array", something the user
insert a choice given the array, then enter for example with "a" method
and insert is required, and then the added element is the same for the
pop .... I do not know if it was clear ... excuse the bad English
 
R

Robert Klemme

Hello I am looking to do a class with two methods, a push and a pop, how
do I define the methods for receiving the "array", something the user
insert a choice given the array, then enter for example with "a" method
and insert is required, and then the added element is the same for the
pop .... I do not know if it was clear ... excuse the bad English

It was not very clear (at least to me) and this also looks like a
homework assignment for implementing a stack. I suggest, you have a
look at the std lib documentation at http://ruby-doc.org/core/

Cheers

robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,197
Messages
2,571,040
Members
47,634
Latest member
RonnyBoelk

Latest Threads

Top