Skip to primary content
Skip to secondary content

perlkour

efficient movement around obstacles

Main menu

  • Home
  • What is perlkour?

Monthly Archives: September 2016

Another Ruby Enumerator trick

Posted on September 19th, 2016 by Mike
Reply

I was working with the official Ruby gem for the Zendesk API. It’s a quirky little thing but on the whole quite nice to work with. I did run into one little gotcha: in order to retrieve all the items in a paginated collection, you have to use the #all! or #all methods (the bang version raises an error), and you must pass it a block.

Continue reading →

Posted in Solutions, TIL | Tagged ruby | Leave a reply

Exploring Enumerators in Ruby

Posted on September 13th, 2016 by Mike
Reply

I’m fiddling with a bit of Ruby code for my silly Ioughta gem. In this module, the each_resolved_pair method takes a structure of “pairs” (of symbols and lambdas) and mutates them (by calling the lambda with an incrementing value), returning the resolved pairs.

Continue reading →

Posted in Solutions, TIL | Tagged ruby | Leave a reply

Recent Posts

  • Abusing bang methods in Ruby for fun and profit
  • VLAN trunking in Ubuntu Server
  • Whole-home audio redux with Amazon and Google
  • One man’s search for the perfect streaming media player
  • Session-only cookie corruption in Ruby web apps

Recent Comments

  • hachi8833 on Session-only cookie corruption in Ruby web apps
  • Niraj on Whole-home audio redux with Amazon and Google
  • hachi8833 on Session-only cookie corruption in Ruby web apps
  • Mike on Session-only cookie corruption in Ruby web apps
  • hachi8833 on Session-only cookie corruption in Ruby web apps

Archives

  • May 2018
  • March 2018
  • November 2017
  • September 2016
  • February 2016
  • November 2015
  • October 2015
  • September 2015
  • July 2015
  • October 2012
  • September 2012
  • August 2012

Categories

  • 0xff Topic
  • Duly Noted
  • InfoSec
  • Lepidoptera
  • Product Reviews
  • Rants & Raves
  • Reviews
  • Service Reviews
  • Solutions
  • Talks
  • TIL
  • Updates and Fixes

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Proudly powered by WordPress