ruby snippets