Updated ruby snippets