Skip to content

#each iterator #4

@DanRathbun

Description

@DanRathbun

#each(), and #each_with_index() both simply return the collection for Enumerable objects.

But this is a bit weird, as the receiver is the TaskbarProgress object, and the enumerable collection is a parameter. I would still say not to make things work non-rubyish.
(A nitpick is that assigning a reference to the result of a block form method, and then returning it in the next statement is frivolous.)

If you want a block form that returns the ALL block results, it should be named collect(), alias map(), etc.; and select(), find_all(), etc. for filtered results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions