Skip to content

Overload operators #2

Open
Open

Description

@marcusmalmberg

Enable basic array operators to work on the object. E.g.

arr = [1,2,3,4]
itr = ArrayIterator.new(arr)
itr[2] # => 3

Activity

  1. marcusmalmberg commented on Nov 9, 2012

    @marcusmalmberg
    OwnerAuthor

    A good solution might be to extend the default array with the iterator functionality instead? http://stackoverflow.com/questions/2938993/where-do-you-extend-classes-in-your-rails-application

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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