[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7991":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":20,"topics":21,"createdAt":10,"pushedAt":10,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":16,"starSnapshotCount":16,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},7991,"best-ruby","franzejr\u002Fbest-ruby","franzejr","Ruby Tricks, Idiomatic Ruby, Refactoring and Best Practices","http:\u002F\u002Ffranzejr.github.io\u002Fbest-ruby\u002F",null,"Ruby",2387,212,100,6,0,55.99,false,"master",true,[],"2026-06-12 04:00:36","# Ruby Tricks, Idiomatic Ruby, Refactorings and Best Practices\n\n> Do you know why experienced Ruby programmers tend to reach for basic collections\n> and hashes while programmers from other languages go for more specialized classes?\n> Do you know the difference between strip, chop, and chomp; and why there are three\n> such similar methods when apparently one might suffice (Not to mention lstrip and\n> rstrip!)? Do you know the downsides of dynamic typing? Do you know why the differences\n> between strings and symbols get so blurry, even to experienced Ruby developers?\n> How about metaprogramming? What the heck is an eigenclass? How about\n> protected methods? Do you know what they’re really about? Really? Are you sure?\n[Eloquent Ruby](http:\u002F\u002Fwww.amazon.com\u002FEloquent-Ruby-Addison-Wesley-Professional\u002Fdp\u002F0321584104)\n\n> Absolutely the best way to learn to write idiomatic Ruby code is to read idiomatic Ruby code. [Eloquent Ruby](http:\u002F\u002Fwww.amazon.com\u002FEloquent-Ruby-Addison-Wesley-Professional\u002Fdp\u002F0321584104)\n\nThis repository aims to help everyone write more idiomatic, clean, and tricky ruby code and also document good refactoring techniques. You can add your own technique or paste it from some website. Do not forget the source, of course. All the tricks are in the \u002Ftricks folder.\n\nFor the sake of clarity, you should paste in the markdown format. At the end, if the code is not your own, paste a reference to the author and source of the technique.\n\n## [Tricks](tricks.md)\n\nIn this part we can review some obscure or awesome features from the and the standard ruby library which we normally forget.\n\n## [Idiomatic Ruby](idiomatic_ruby.md)\n\nYou can write Ruby code, but it can sometimes look like Java code. Here you can find some tips to write more naturally and take advantage of idiomatic Ruby.\n\n## [Refactorings](refactorings.md)\n\nSmall (and big) improvements you can apply to your code and improve it's readability and maintenance. Change the internal structure of the code without changing it's behaviour.\n\n## [Best Practices](best_practices.md)\n\nIf you keep your house cleaned constantly you'll never need to waste a weekend cleaning it. The same applies to your code. Be disciplined and keep your code looking good with those tips.\n\n## Contributors\n\nA big thanks to the following [people](https:\u002F\u002Fgithub.com\u002Ffranzejr\u002Fbest-ruby\u002Fgraphs\u002Fcontributors)\n\n## Contributing\n\n1. [Fork it](https:\u002F\u002Fgithub.com\u002Ffranzejr\u002Fbest-ruby)\n2. Create a branch with your idea: `git checkout -b my-idea`\n3. Check in which category it should be: best practice, idiomatic ruby, refactoring or trick. If you don't know, please open an issue and ask.\n4. Add your idea to the collection of `.md` files in the correct folder (tricks, refactorings, idiomatic_ruby or best_practices) folder\n5. Commit your changes: `git commit -am 'Add my idea'`\n6. Push to the branch: `git push origin my-idea`\n7. Create a new Pull Request and explain your technique in the markdown file\n","该项目旨在帮助开发者编写更地道、简洁且巧妙的 Ruby 代码，并记录良好的重构技术。核心功能包括收集和分享 Ruby 编程技巧、惯用法、重构方法及最佳实践，涵盖了从基本集合与哈希的使用到字符串与符号的区别等多方面内容，强调了元编程、特征类等高级概念的理解。适合于希望提升 Ruby 编码技能或改善现有项目代码质量的开发人员，在日常编码中遇到特定问题时寻找解决方案，或是想要深入理解 Ruby 语言特性的学习者参考使用。",2,"2026-06-11 03:15:31","top_language"]