#rubytricks 搜索结果
If you want to implement a Bitset in Ruby then... you shouldn't. It's already done: 5[0]=>1, 5[1]=>0, 5[2]=>1 #rubytricks
Awesome Print — pretty print of XXI century http://bit.ly/cI0cKf My shot: http://bit.ly/cHMSvm #rubytricks
#Ruby_Tip define_method is a powerful tool for metaprogramming in Ruby, as it allows you to define new methods on a class or module at runtime. This can be used to create more expressive, maintainable, and efficient code.#rubytricks #rubyonrails

Calling methods on modules. What does it mean "extend self"? http://www.neeraj.name/2009/10/20/extending-self-in-a-module.html #rubytricks
Long live Rocco (which is Docco in Ruby)! http://github.com/rtomayko/rocco. Documentation gets really sweet #rubytricks
Sorting hash keys their values: hash = {:a => 4, :b => 1, :c => 3}; hash.keys.sort_by { |k| hash[k] } #rubytricks
Enumerable#slice_before is an awesome piece of Ruby stdlib http://bit.ly/bbq0Sd #rubytricks (please note the hashtag, I'll use it from now)
echo autoload :Nokogiri, "nokogiri" >> ~/.irbrc ( I use Nokogiri quite often, but I don't want to waste memory if I don't ) #rubytricks
Also check the module_function method http://ruby-doc.org/core/classes/Module.html#M001642 (thanks to @codemanki) #rubytricks
Did you know that irb supports nested sessions? Run irb and type "irb 'hello'" and then gsub /$/, ', world' #rubytricks
10 Useful Ruby One-Liners: Examples and Descriptions blog.rubyonrails.ba/articles/10-us… #RubyTricks #RubyCodeSnippets
blog.rubyonrails.ba
10 Useful Ruby One-Liners: Examples and Descriptions
One-liners, concise lines of code that perform a specific task, are particularly popular among Ruby developers for their simplicity and efficiency. In this blog post, we will explore 10 of the most...
Ruby Tip: To uppercase a character without the upcase method you can do this... ("b".ord ^ 32).chr - ord convert the string into its ASCII value - ^ (the hat looking thing) is the XOR operator - 32 is the difference between uppercase & lowercase characters #ruby #rubytricks
RT @kpumuk If you want to implement a Bitset in Ruby then... you shouldn't. It's already done: 5[0]=>1, 5[1]=>0, 5[2]=>1 #rubytricks
Also use irb_jobs to check subirb's @kpumuk oh, wait, you can move through subirb's with irb_fg(number). cool. (via @rofh) #rubytricks
#rubytricks Fizz Buzz in procs: codon.com/programming-wi…
[code] The Split is Not Enough: Unicode Whitespace Shenigans for Rubyists j.mp/QGnXLn #Nonsense #RubyTricks
10 Useful Ruby One-Liners: Examples and Descriptions blog.rubyonrails.ba/articles/10-us… #RubyTricks #RubyCodeSnippets
blog.rubyonrails.ba
10 Useful Ruby One-Liners: Examples and Descriptions
One-liners, concise lines of code that perform a specific task, are particularly popular among Ruby developers for their simplicity and efficiency. In this blog post, we will explore 10 of the most...
10 Useful Ruby One-Liners: Examples and Descriptions blog.rubyonrails.ba/articles/10-us… #RubySnippets #RubyTricks
blog.rubyonrails.ba
10 Useful Ruby One-Liners: Examples and Descriptions
One-liners, concise lines of code that perform a specific task, are particularly popular among Ruby developers for their simplicity and efficiency. In this blog post, we will explore 10 of the most...
10 Useful Ruby One-Liners: Examples and Descriptions blog.rubyonrails.ba/articles/10-us… #RubyTricks #RubyCode
blog.rubyonrails.ba
10 Useful Ruby One-Liners: Examples and Descriptions
One-liners, concise lines of code that perform a specific task, are particularly popular among Ruby developers for their simplicity and efficiency. In this blog post, we will explore 10 of the most...
10 Useful Ruby One-Liners: Examples and Descriptions blog.rubyonrails.ba/articles/10-us… #RubyBeginners #RubyTricks
blog.rubyonrails.ba
10 Useful Ruby One-Liners: Examples and Descriptions
One-liners, concise lines of code that perform a specific task, are particularly popular among Ruby developers for their simplicity and efficiency. In this blog post, we will explore 10 of the most...
#Ruby_Tip define_method is a powerful tool for metaprogramming in Ruby, as it allows you to define new methods on a class or module at runtime. This can be used to create more expressive, maintainable, and efficient code.#rubytricks #rubyonrails

#rubytricks Trick2018: Tricky Ruby code from around the world, entered into the Trick 2018 competition: github.com/tric/trick2018/
#rubytricks Qlobe: github.com/knoxknox/qlobe. A quine that prints a globe, but also contains the code that prints a globe also.
#rubytricks Fizz Buzz in procs: codon.com/programming-wi…
Ruby Tip: To uppercase a character without the upcase method you can do this... ("b".ord ^ 32).chr - ord convert the string into its ASCII value - ^ (the hat looking thing) is the XOR operator - 32 is the difference between uppercase & lowercase characters #ruby #rubytricks
A whole load of (guest) picks this week, check them out at vienna-rb.at/blog/2015/04/0… #blurst #hamburger #rubytricks #crystal #jekyll
10 Ruby Capabilities You Might Not Know About bit.ly/VN8N58 #rubytutorials #rubytricks
[code] The Split is Not Enough: Unicode Whitespace Shenigans for Rubyists j.mp/QGnXLn #Nonsense #RubyTricks
RT @kpumuk If you want to implement a Bitset in Ruby then... you shouldn't. It's already done: 5[0]=>1, 5[1]=>0, 5[2]=>1 #rubytricks
If you want to implement a Bitset in Ruby then... you shouldn't. It's already done: 5[0]=>1, 5[1]=>0, 5[2]=>1 #rubytricks
echo autoload :Nokogiri, "nokogiri" >> ~/.irbrc ( I use Nokogiri quite often, but I don't want to waste memory if I don't ) #rubytricks
Also use irb_jobs to check subirb's @kpumuk oh, wait, you can move through subirb's with irb_fg(number). cool. (via @rofh) #rubytricks
Did you know that irb supports nested sessions? Run irb and type "irb 'hello'" and then gsub /$/, ', world' #rubytricks
#Ruby_Tip define_method is a powerful tool for metaprogramming in Ruby, as it allows you to define new methods on a class or module at runtime. This can be used to create more expressive, maintainable, and efficient code.#rubytricks #rubyonrails

Something went wrong.
Something went wrong.
United States Trends
- 1. D’Angelo 124K posts
- 2. D’Angelo 124K posts
- 3. Brown Sugar 11.4K posts
- 4. Black Messiah 4,791 posts
- 5. #GoodTimebro 1,441 posts
- 6. Powell 32.2K posts
- 7. Happy Birthday Charlie 108K posts
- 8. Voodoo 11.4K posts
- 9. How Does It Feel 5,778 posts
- 10. #BornOfStarlightHeeseung 75.6K posts
- 11. Rest in Power 11.9K posts
- 12. #csm217 3,649 posts
- 13. Pentagon 91.8K posts
- 14. Alex Jones 24.7K posts
- 15. Osimhen 70.8K posts
- 16. #PortfolioDay 7,753 posts
- 17. Sandy Hook 9,323 posts
- 18. Neo Soul 1,226 posts
- 19. Jill Scott N/A
- 20. Rwanda 51.3K posts