# Pass array methods for

**URL:** <https://www.ruby-forum.com/t/pass-array-methods-for/152318>\
**Category:** Ruby\
**Created:** [November 2, 2008, 4:07am UTC](https://www.ruby-forum.com/t/pass-array-methods-for/152318 "2008-11-02T04:07:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![edipofederle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/a88e4f/32.png) [@edipofederle](https://www.ruby-forum.com/u/edipofederle)\
**Post date:** [November 2, 2008, 4:07am UTC](https://www.ruby-forum.com/t/pass-array-methods-for/152318/1 "2008-11-02T04:07:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![edipofederle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/a88e4f/32.png) [@edipofederle](https://www.ruby-forum.com/u/edipofederle)\
**Post date:** [November 2, 2008, 11:45am UTC](https://www.ruby-forum.com/t/pass-array-methods-for/152318/2 "2008-11-02T11:45:30Z")

</div>

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 [RDoc Documentation](http://ruby-doc.org/core/)

Cheers

robert
