Guides to the core and standard libraries, as well as selected Rubygems.
Category: APIs and Libraries
Episode #196: String Templates
Have you ever wanted a way to customize the format of certain generated strings, but felt like ERB or some other templating language was overkill? If so, today's episode should …
Episode #195: Advanced String Formats
Following on from the last episode, today we look at some more advanced uses of Ruby's string formatting features.
Episode #194: String Format
Sometimes Kernel#puts and string interpolation doesn't give us the level of control we want over our program's output. When we need to control numeric formatting and field widths, we need …
Episode #193: Pathname
While the File methods are great for occasional use, for programs that deal extensively in filenames we need to bring out the big guns. Today we'll get an overview of …
Episode #192: Filenames
Ruby provides a lot of tools for breaking filenames into their component parts, but they aren't always well documented. Today's episode combines goes over some basics as well as a …
Episode #190: Gsub
Today we look at the humble String#gsub method, and learn that it has some surprising tricks up its sleeve.
Episode #184: Sequel, Postgres, JSON
Recently we looked at the Sequel library for interacting with SQL databases. Today, we'll use Sequel again to play with the native JSON support in PostgreSQL 9.3.
Episode #181: Schwartzian Transform
Today's episode demonstrates a technique for speeding up the process of sorting some collections.
Episode #179: Sequel
ActiveRecord has become practically synonymous with SQL database access in Ruby, but it's not the only way to talk to SQL stores. Today we'll explore Sequel, a wonderfully rich tool …