Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Hash Updates

#17

Remove aliases:
  findAll
  include
  index
  select

Remove methods:
  reject
  toTemplateReplacements
  update


Update methods:
  set - Accept either two arguments for key and value, or accept an object of key/values.
  This will return the Hash instance instead of the values set.
  unset - Accept either one argument for key, or accept an array of keys.
  This will return a single value if 1 key is specified or an array for more than 1 key.

Add methods:
  clear - Clears out the hash

Reported by Joe Gornick · February 7th, 2009 @ 02:48 AM

State: resolved
Milestone: none
Assigned to: Joe Gornick Joe Gornick

Activity

  1. Joe Gornick
  2. John-David Dalton
  3. John-David Dalton
    John-David Dalton

    Template#evaluate will want hash.toTemplateReplacements, so either change it to look for hash#toObject or check for hash#toObject first and then toTemplateReplacements as a backcompat.

    March 11th, 2009 @ 01:03 AM

  4. Joe Gornick
    Joe Gornick

    Make sure to write an optimized version of first and last methods.

    March 11th, 2009 @ 01:25 AM

  5. Joe Gornick
    Joe Gornick

    Rename include -> contains and add a strict parameter.

    March 25th, 2009 @ 01:32 AM

  6. Joe Gornick
  7. Joe Gornick
    Joe Gornick

    This commit did not include the Hash#diff. Please refer to #24 Add Array#diff and Hash#diff methods.

    April 1st, 2009 @ 12:40 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.