My first post in this site. I'm currently learning Ruby and have been fiddling with methods and blocks. Coming from other programming languages, notably Basic based, a little Java & C++, I find that passing blocks into methods is a little cryptic. What I mean is that when reading a method description (definition) there is no reference made to the fact that a block could be passed in as an argument. To me, it appears as if the method has to be read in conjunction with how the method is actually called in order to know if a block is passed or not. If my assertion is correct then the actual method call(s) in source code could be 100's of lines away from the method definition.
Is this how things are or are there some techniques to smooth this process somewhat?
Steve
Is this how things are or are there some techniques to smooth this process somewhat?
Steve