---
title: "ruby | Today I Learned | OOZOU"
description: "Catatan singkat dan praktis tentang ruby dari tim OOZOU."
canonical: https://oozou.com/id/til-topics/ruby
locale: id
---

# ruby | Today I Learned

> Catatan singkat dan praktis tentang ruby dari tim OOZOU.

- [Mengizinkan Paste Blok Ruby Multibaris di Pry Saat Menggunakan Notasi Titik di Awal](https://oozou.com/id/til/allow-pasting-multiline-ruby-blocks-in-pry-when-using-leading-dot-notation-116) ([markdown](https://oozou.com/id/til/allow-pasting-multiline-ruby-blocks-in-pry-when-using-leading-dot-notation-116.md)) (2021-04-30): Sekarang kami sering menggunakan notasi titik di awal baris, misalnya:
- [Heredoc tanpa Interpolasi](https://oozou.com/id/til/heredoc-without-interpolation-74) ([markdown](https://oozou.com/id/til/heredoc-without-interpolation-74.md)) (2020-10-14): Terkadang Anda ingin menggunakan Heredoc di Ruby tanpa interpolasi ('#{....}'). Anda dapat melakukannya dengan menambahkan tanda kutip tunggal di sekitar kata kunci Anda:
- [Hashtable Tingkat Menengah yang Terbentuk Otomatis di Ruby](https://oozou.com/id/til/automagical-intermediate-level-hashtables-in-ruby-62) ([markdown](https://oozou.com/id/til/automagical-intermediate-level-hashtables-in-ruby-62.md)) (2020-10-13): Semua hashtable tingkat menengah akan dibuat secara otomatis
- [Mengganti Versi Ruby untuk Satu Perintah dengan rbenv](https://oozou.com/id/til/change-ruby-version-for-single-command-with-rbenv-68) ([markdown](https://oozou.com/id/til/change-ruby-version-for-single-command-with-rbenv-68.md)) (2020-10-13): Anda dapat mengganti versi Ruby sementara dengan rbenv local
- [Ubah Go to Definition di VS Code menjadi Cmd+Click](https://oozou.com/id/til/change-vs-code-go-to-definition-to-cmd-click-59) ([markdown](https://oozou.com/id/til/change-vs-code-go-to-definition-to-cmd-click-59.md)) (2020-10-13): Cukup buka file JSON pengaturan pengguna Anda dan gunakan opsi ini:
- [Meningkatkan Performa Bundler](https://oozou.com/id/til/improve-bundler-performance-56) ([markdown](https://oozou.com/id/til/improve-bundler-performance-56.md)) (2020-10-13): Tingkatkan performa bundler Anda dengan menjalankan task bundler secara bersamaan dalam beberapa job:
- [Relasi optional + RSpec dengan shoulda-matchers](https://oozou.com/id/til/optional-relation-rspec-w-shoulda-matchers-41) ([markdown](https://oozou.com/id/til/optional-relation-rspec-w-shoulda-matchers-41.md)) (2020-10-13): User 1 - 0..1 Laptop
- [Menghapus Bundler Bawaan Ruby 2.6](https://oozou.com/id/til/remove-ruby-2-6-bundled-bundler-39) ([markdown](https://oozou.com/id/til/remove-ruby-2-6-bundled-bundler-39.md)) (2020-10-13): Membuat aplikasi Rails 6 dengan Ruby 2.6+ saat Anda sudah menginstal bundler v2 akan menghasilkan binstub yang tidak dapat digunakan. Jika Anda melihat error You must use Bundler 2 or greater with this lockfile. Anda dapat menghapus…
- [Menjalankan Rubocop pada Branch Anda Saat Ini](https://oozou.com/id/til/run-rubocop-against-your-current-branch-21) ([markdown](https://oozou.com/id/til/run-rubocop-against-your-current-branch-21.md)) (2020-10-13): Menjalankan rubocop pada branch Anda saat ini
- [Menjalankan Rubocop sebelum Commit](https://oozou.com/id/til/run-rubocop-before-commit-8) ([markdown](https://oozou.com/id/til/run-rubocop-before-commit-8.md)) (2020-10-13): Git hook sangat ampuh untuk mengotomatiskan tugas dan menegakkan standar penulisan kode di repository Git. Salah satu penggunaan umum Git hook adalah menjalankan test otomatis dan alat analisis kode sebelum…
- [Menyembunyikan Warning rspec](https://oozou.com/id/til/suppress-rspec-warnings-33) ([markdown](https://oozou.com/id/til/suppress-rspec-warnings-33.md)) (2020-10-13): $ RUBYOPT=W0 bundle exec rspec spec/ ...
- [Anda Dapat Menggunakan FactoryBot untuk Model Non-ActiveRecord](https://oozou.com/id/til/you-can-use-factorybot-for-non-activerecord-models-45) ([markdown](https://oozou.com/id/til/you-can-use-factorybot-for-non-activerecord-models-45.md)) (2020-10-13): Anda dapat menggunakan method initialize\with* dari FactoryBot untuk menginisialisasi objek dengan cara apa pun yang Anda inginkan, sehingga Anda bisa membuat factory untuk objek apa pun sesuka hati

All notes: [Today I Learned](https://oozou.com/id/til) ([markdown](https://oozou.com/id/til.md)).

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/id/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
