Quantcast
Channel: 4 Lines of Code » array
Browsing latest articles
Browse All 2 View Live

Image may be NSFW.
Clik here to view.

The splat operator in Ruby

The splat operator in Ruby, Groovy and Perl allows you to switch between parameters and arrays: it splits a list in a series of parameters, or collects a series of parameters to fill an array. The...

View Article



Image may be NSFW.
Clik here to view.

Internationalize (I18n) an Array of Strings in Rails

Sometimes you would like to define an array of strings in your YAML config files, for example in the YAML text files in config/locales which define your translations. It is possible to define arrays in...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images