A
Alex Combas
Working my way through the "ruby course"
http://ruby-doc.org/docs/Immersive Ruby programming course/RubyCourse=
_1.0-1.pdf
I was wondering if anyone else finds this tutorial a little confusing.
Its really good in parts, but other parts are really unclear but maybe
its just me.
For example:
~~~
find_it
Write a function find_it that takes an array of strings and a block.
The block should take two parameters and return a boolean value.
The function should allow to implement longest_string, shortest_string,
and other functions by changing the block.
~~~
Sorry, this just seems really muddled.
Is find_it a class, method, or what?
What is the point of the boolean that the block needs to return?
I asume that find_it is a class, and longest_string and shortest_string
are object methods, and the array and the block are passed when
the class is initialized, but I feel like I'm missing something.
http://ruby-doc.org/docs/Immersive Ruby programming course/RubyCourse=
_1.0-1.pdf
I was wondering if anyone else finds this tutorial a little confusing.
Its really good in parts, but other parts are really unclear but maybe
its just me.
For example:
~~~
find_it
Write a function find_it that takes an array of strings and a block.
The block should take two parameters and return a boolean value.
The function should allow to implement longest_string, shortest_string,
and other functions by changing the block.
~~~
Sorry, this just seems really muddled.
Is find_it a class, method, or what?
What is the point of the boolean that the block needs to return?
I asume that find_it is a class, and longest_string and shortest_string
are object methods, and the array and the block are passed when
the class is initialized, but I feel like I'm missing something.