This site is a preview of the curriculum for our Summer 2018 bootcamp in Burlington, Vermont. As we continue our preparation, courses and lessons will appear and disappear; we will rename, rearrange, clarify, and obfuscate as needed... Please consider this a work in progress and keep checking in.

Ruby Blocks:
Enumerators Advanced


Slides

Enumerators

This topic is too advanced for a two-day Ruby class.

Ref. WGR Chapter 10

Enumerable

  • Enumerable is a module you can mix in to your own classes
  • Your class has to define an each method (only requirement)

Enumerable Methods

Enumerable.instance_methods(false).sort

Enumerators

  • similar to iterators
  • iterator is a method
  • enumerator is an object


Comments

comments powered by Disqus