Fun with Ruby method argument defaults
A quick overview of simple but powerful (if weird) techniques of (ab)using Ruby method argument defaults, like def read_data(file: raise(ArgumentError, '#read_data requires path to .txt'))
A quick overview of simple but powerful (if weird) techniques of (ab)using Ruby method argument defaults, like def read_data(file: raise(ArgumentError, '#read_data requires path to .txt'))
Post a comment