Videos tagged with Ruby Banter






Ruby Banter #005: The Case Equality, Treequal or Equaal operator

Ruby Banter #005: The Case Equality, Treequal or Equaal operator

Posted in Development

The Case Equality, Treequal or Equaal operator, however you want to call it, allows us to match objects in a more meaningful manner than plain equality. In this episode Manfred shows how you can override the method on your own classes to do advanced matching. Please note that, although Manfred thinks he's implementing the disjoint set of markers, he's actually implementing the union.

Tags: Ruby, Ruby Banter, operator





Ruby Banter #002: The Boat

Ruby Banter #002: The Boat

Posted in Development

The sort method in Ruby uses the boat operator, sometimes called ‘spaceship’, to compare object instances. In this episode Manfred shows how you can make your objects sortable by defining the boat operator.

Tags: Ruby, Ruby Banter