Ruby snippets