Forum: Ruby Pass array methods for

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5d052a386fa13aceec719a8f37a6231c?d=identicon&s=25 Edipofederle Edipofederle (edipofederle)
on 2008-11-02 04:07
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
E0d864d9677f3c1482a20152b7cac0e2?d=identicon&s=25 Robert Klemme (Guest)
on 2008-11-02 11:45
(Received via mailing list)
On 02.11.2008 04:06, Edipofederle Edipofederle wrote:
> 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
This topic is locked and can not be replied to.