Ruby - chaining methods and returning array -
 I have some methods for a class that has   Then I want to be able to chain series together so that I can do it   However, I do not know how to do it, and I have not been able to find heaven online, I have returned   If someone can not help with code only   Thank you!  ["1", "3", "2" , "6", "2"] . It's fine that these string arrays are not numerical, I have another way that takes an array, and it has a  
  first = turn on.New ago.roll.line first.show.line   myself , but I can not really understand what it does.  Line  Pad If I take it to any other method, then the problem is actually only dealing with Chenning and return. 
 Since your  #roll  and  #show  Methods come back an array, you should actually be able to  first.roll.line  a method  array # line . 
 BTW, already has the  Array # join  which is the array Won also included with a string, like your # line method, so you can use  first.roll.join ( '')  and get rid of the # line method. 
Comments
Post a Comment