> For the complete documentation index, see [llms.txt](https://ploegert.gitbook.io/til/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ploegert.gitbook.io/til/programmy/ruby.md).

# ruby

- [A Basic Case Statement](https://ploegert.gitbook.io/til/programmy/ruby/a-basic-case-statement.md)
- [A Shorthand For Rerunning Failed Tests With RSpec](https://ploegert.gitbook.io/til/programmy/ruby/a-shorthand-for-rerunning-failed-tests-with-rspec.md)
- [Add Comments To Regex With Free-Spacing](https://ploegert.gitbook.io/til/programmy/ruby/add-comments-to-regex-with-free-spacing.md)
- [Add Linux As A Bundler Platform](https://ploegert.gitbook.io/til/programmy/ruby/add-linux-as-a-bundler-platform.md)
- [Are They All True?](https://ploegert.gitbook.io/til/programmy/ruby/are-they-all-true.md)
- [Assert About An Object's Attributes With RSpec](https://ploegert.gitbook.io/til/programmy/ruby/assert-about-an-objects-attributes-with-rspec.md)
- [Assoc For Hashes](https://ploegert.gitbook.io/til/programmy/ruby/assoc-for-hashes.md)
- [Block Comments](https://ploegert.gitbook.io/til/programmy/ruby/block-comments.md)
- [Build HTTP And HTTPS URLs](https://ploegert.gitbook.io/til/programmy/ruby/build-http-and-https-urls.md)
- [Chaining Multiple RSpec Change Matchers](https://ploegert.gitbook.io/til/programmy/ruby/chaining-multiple-rspec-change-matchers.md)
- [Check Return Status Of Running A Shell Command](https://ploegert.gitbook.io/til/programmy/ruby/check-return-status-of-running-a-shell-command.md)
- [Click On Text With Capybara](https://ploegert.gitbook.io/til/programmy/ruby/click-on-text-with-capybara.md)
- [Colorful Output With MiniTest](https://ploegert.gitbook.io/til/programmy/ruby/colorful-output-with-minitest.md)
- [Comparing Class Hierarchy Relationships](https://ploegert.gitbook.io/til/programmy/ruby/comparing-class-hierarchy-relationships.md)
- [Comparing Arrays In RSpec](https://ploegert.gitbook.io/til/programmy/ruby/comparing-arrays-in-rspec.md)
- [Construct A Constant From A String](https://ploegert.gitbook.io/til/programmy/ruby/construct-a-constant-from-a-string.md)
- [Create an Array of Stringed Numbers](https://ploegert.gitbook.io/til/programmy/ruby/create-an-array-of-stringed-numbers.md)
- [Create a CSV::Table Object](https://ploegert.gitbook.io/til/programmy/ruby/create-a-csv-table-object.md)
- [Create A Hash From An Array Of Arrays](https://ploegert.gitbook.io/til/programmy/ruby/create-a-hash-from-an-array-of-arrays.md)
- [Create Listing Of All Middleman Pages](https://ploegert.gitbook.io/til/programmy/ruby/create-listing-of-all-middleman-pages.md)
- [Create Named Structs With Struct.new](https://ploegert.gitbook.io/til/programmy/ruby/create-named-structs-with-struct-new.md)
- [Create Thumbnail Image For A PDF](https://ploegert.gitbook.io/til/programmy/ruby/create-thumbnail-image-for-a-pdf.md)
- [Defaulting To Frozen String Literals](https://ploegert.gitbook.io/til/programmy/ruby/defaulting-to-frozen-string-literals.md)
- [Define A Custom RSpec Matcher](https://ploegert.gitbook.io/til/programmy/ruby/define-a-custom-rspec-matcher.md)
- [Define A Method On A Struct](https://ploegert.gitbook.io/til/programmy/ruby/define-a-method-on-a-struct.md)
- [Destructure The First Item From An Array](https://ploegert.gitbook.io/til/programmy/ruby/destructure-the-first-item-from-an-array.md)
- [Destructuring Arrays In Blocks](https://ploegert.gitbook.io/til/programmy/ruby/destructuring-arrays-in-blocks.md)
- [Disassemble Some Codes](https://ploegert.gitbook.io/til/programmy/ruby/disassemble-some-codes.md)
- [Double Splat To Merge Hashes](https://ploegert.gitbook.io/til/programmy/ruby/double-splat-to-merge-hashes.md)
- [Edit Previous Parts Of The Pry Buffer History](https://ploegert.gitbook.io/til/programmy/ruby/edit-previous-parts-of-the-pry-buffer-history.md)
- [Editing Code In Pry](https://ploegert.gitbook.io/til/programmy/ruby/editing-code-in-pry.md)
- [Encode A String As URL-Safe Base64](https://ploegert.gitbook.io/til/programmy/ruby/encode-a-string-as-url-safe-base64.md)
- [Enumerate A Pairing Of Every Two Sequential Items](https://ploegert.gitbook.io/til/programmy/ruby/enumerate-a-pairing-of-every-two-sequential-items.md)
- [Evaluating One-Off Commands](https://ploegert.gitbook.io/til/programmy/ruby/evaluating-one-off-commands.md)
- [Exclude Values From An Array](https://ploegert.gitbook.io/til/programmy/ruby/exclude-values-from-an-array.md)
- [Expect A Method To Be Called And Actually Call It](https://ploegert.gitbook.io/til/programmy/ruby/expect-a-method-to-be-called-and-actually-call-it.md)
- [FactoryGirl Sequences](https://ploegert.gitbook.io/til/programmy/ruby/factory-girl-sequences.md)
- [Fail](https://ploegert.gitbook.io/til/programmy/ruby/fail.md)
- [Find The Min And Max With A Single Call](https://ploegert.gitbook.io/til/programmy/ruby/find-the-min-and-max-with-a-single-call.md)
- [Finding The Source of Ruby Methods](https://ploegert.gitbook.io/til/programmy/ruby/finding-the-source-of-ruby-methods.md)
- [Generate A Signed JWT Token](https://ploegert.gitbook.io/til/programmy/ruby/generate-a-signed-jwt-token.md)
- [Generate Ruby Version And Gemset Files With RVM](https://ploegert.gitbook.io/til/programmy/ruby/generate-ruby-version-and-gemset-files-with-rvm.md)
- [Get Info About Your RubyGems Environment](https://ploegert.gitbook.io/til/programmy/ruby/get-info-about-your-ruby-gems-environment.md)
- [Identify Outdated Gems](https://ploegert.gitbook.io/til/programmy/ruby/identify-outdated-gems.md)
- [If You Detect None](https://ploegert.gitbook.io/til/programmy/ruby/if-you-detect-none.md)
- [Iterate With An Offset Index](https://ploegert.gitbook.io/til/programmy/ruby/iterate-with-an-offset-index.md)
- [Include Extra Context In A Honeybadger Notify](https://ploegert.gitbook.io/til/programmy/ruby/include-extra-context-in-a-honeybadger-notify.md)
- [Ins And Outs Of Pry](https://ploegert.gitbook.io/til/programmy/ruby/ins-and-outs-of-pry.md)
- [Invoking Rake Tasks Multiple Times](https://ploegert.gitbook.io/til/programmy/ruby/invoking-rake-tasks-multiple-times.md)
- [IRB Has Built-In Benchmarking With Ruby 3](https://ploegert.gitbook.io/til/programmy/ruby/irb-has-built-in-benchmarking-with-ruby-3.md)
- [Jump Out Of A Nested Context With Throw/Catch](https://ploegert.gitbook.io/til/programmy/ruby/jump-out-of-a-nested-context-with-throw-catch.md)
- [Last Raised Exception In The Call Stack](https://ploegert.gitbook.io/til/programmy/ruby/last-raised-exception-in-the-call-stack.md)
- [Limit Split](https://ploegert.gitbook.io/til/programmy/ruby/limit-split.md)
- [List The Running Ruby Version](https://ploegert.gitbook.io/til/programmy/ruby/list-the-running-ruby-version.md)
- [Listing Local Variables](https://ploegert.gitbook.io/til/programmy/ruby/listing-local-variables.md)
- [Map With Index Over An Array](https://ploegert.gitbook.io/til/programmy/ruby/map-with-index-over-an-array.md)
- [Mock Method Chain Calls With RSpec](https://ploegert.gitbook.io/til/programmy/ruby/mock-method-chain-calls-with-rspec.md)
- [Mocking Requests With Partial URIs Using Regex](https://ploegert.gitbook.io/til/programmy/ruby/mocking-requests-with-partial-uris-using-regex.md)
- [Named Regex Captures Are Assigned To Variables](https://ploegert.gitbook.io/til/programmy/ruby/named-regex-captures-are-assigned-to-variables.md)
- [Navigate Back In The Browser With Capybara](https://ploegert.gitbook.io/til/programmy/ruby/navigate-back-in-the-browser-with-capybara.md)
- [Next And Previous Floats](https://ploegert.gitbook.io/til/programmy/ruby/next-and-previous-floats.md)
- [Or Operator Precedence](https://ploegert.gitbook.io/til/programmy/ruby/or-operator-precedence.md)
- [Override The Initial Sequence Value](https://ploegert.gitbook.io/til/programmy/ruby/override-the-initial-sequence-value.md)
- [Parallel Bundle Install](https://ploegert.gitbook.io/til/programmy/ruby/parallel-bundle-install.md)
- [Parse JSON Into An OpenStruct](https://ploegert.gitbook.io/til/programmy/ruby/parse-json-into-an-open-struct.md)
- [Parsing A CSV With Quotes In The Data](https://ploegert.gitbook.io/til/programmy/ruby/parsing-a-csv-with-quotes-in-the-data.md)
- [Pass A Block To Count](https://ploegert.gitbook.io/til/programmy/ruby/pass-a-block-to-count.md)
- [Passing Arbitrary Methods As Blocks](https://ploegert.gitbook.io/til/programmy/ruby/passing-arbitrary-methods-as-blocks.md)
- [Passing Arguments To A Rake Task](https://ploegert.gitbook.io/til/programmy/ruby/passing-arguments-to-a-rake-task.md)
- [Pattern Match Values From A Hash](https://ploegert.gitbook.io/til/programmy/ruby/pattern-match-values-from-a-hash.md)
- [Percent Notation](https://ploegert.gitbook.io/til/programmy/ruby/percent-notation.md)
- [Question Mark Operator](https://ploegert.gitbook.io/til/programmy/ruby/question-mark-operator.md)
- [Rake Only Lists Tasks With Descriptions](https://ploegert.gitbook.io/til/programmy/ruby/rake-only-lists-tasks-with-descriptions.md)
- [Read The First Line From A File](https://ploegert.gitbook.io/til/programmy/ruby/read-the-first-line-from-a-file.md)
- [Rendering ERB](https://ploegert.gitbook.io/til/programmy/ruby/rendering-erb.md)
- [Replace The Current Process With An External Command](https://ploegert.gitbook.io/til/programmy/ruby/replace-the-current-process-with-an-external-command.md)
- [Require Entire Gemfile In Pry Session](https://ploegert.gitbook.io/til/programmy/ruby/require-entire-gemfile-in-pry-session.md)
- [Rerun Only Failures With RSpec](https://ploegert.gitbook.io/til/programmy/ruby/rerun-only-failures-with-rspec.md)
- [Retry A Block After An Exception](https://ploegert.gitbook.io/til/programmy/ruby/retry-a-block-after-an-exception.md)
- [Returning With Sequel](https://ploegert.gitbook.io/til/programmy/ruby/returning-with-sequel.md)
- [rexml Is A Bundled Gem As Of Ruby 3.0.0](https://ploegert.gitbook.io/til/programmy/ruby/rexml-is-a-bundled-gem-as-of-ruby-3-0-0.md)
- [Run An Older Version Of Bundler](https://ploegert.gitbook.io/til/programmy/ruby/run-an-older-version-of-bundler.md)
- [Running A Single MiniTest Example](https://ploegert.gitbook.io/til/programmy/ruby/running-a-single-minitest-example.md)
- [Safe Navigation Operator](https://ploegert.gitbook.io/til/programmy/ruby/safe-navigation-operator.md)
- [Scripting With RVM](https://ploegert.gitbook.io/til/programmy/ruby/scripting-with-rvm.md)
- [Scroll To Top Of Page With Capybara](https://ploegert.gitbook.io/til/programmy/ruby/scroll-to-top-of-page-with-capybara.md)
- [Set RVM Default Ruby](https://ploegert.gitbook.io/til/programmy/ruby/set-rvm-default-ruby.md)
- [Show Public Methods With Pry](https://ploegert.gitbook.io/til/programmy/ruby/show-public-methods-with-pry.md)
- [Silence The Output Of A Ruby Statement In Pry](https://ploegert.gitbook.io/til/programmy/ruby/silence-the-output-of-a-ruby-statement-in-pry.md)
- [Single And Double Quoted String Notation](https://ploegert.gitbook.io/til/programmy/ruby/single-and-double-quoted-string-notation.md)
- [Squeeze Out The Extra Space](https://ploegert.gitbook.io/til/programmy/ruby/squeeze-out-the-extra-space.md)
- [String Interpolation With Instance Variables](https://ploegert.gitbook.io/til/programmy/ruby/string-interpolation-with-instance-variables.md)
- [Summing Collections](https://ploegert.gitbook.io/til/programmy/ruby/summing-collections.md)
- [Turn Key And Value Arrays Into A Hash](https://ploegert.gitbook.io/til/programmy/ruby/turn-key-and-values-arrays-into-a-hash.md)
- [Turning Any Class Into An Enumerator](https://ploegert.gitbook.io/til/programmy/ruby/turning-any-class-into-an-enumerator.md)
- [Turning Things Into Hashes](https://ploegert.gitbook.io/til/programmy/ruby/turning-things-into-hashes.md)
- [Uncaught Exceptions In Pry](https://ploegert.gitbook.io/til/programmy/ruby/uncaught-exceptions-in-pry.md)
- [undef\_method And The Inheritance Hierarchy](https://ploegert.gitbook.io/til/programmy/ruby/undef-method-and-the-inheritance-hierarchy.md)
- [Uninstall Specific Version Of A Ruby Gem](https://ploegert.gitbook.io/til/programmy/ruby/uninstall-specific-version-of-a-ruby-gem.md)
- [Unpacking Strings Into Binary](https://ploegert.gitbook.io/til/programmy/ruby/unpacking-strings-into-binary.md)
- [Up And Down With Integers](https://ploegert.gitbook.io/til/programmy/ruby/up-and-down-with-integers.md)
- [Update The Gemfile Bundled With Version](https://ploegert.gitbook.io/til/programmy/ruby/update-the-gemfile-bundled-with-version.md)
- [Use A Case Statement As A Cond Statement](https://ploegert.gitbook.io/til/programmy/ruby/use-a-case-statement-as-a-cond-statement.md)
- [Use dotenv In A Non-Rails Project](https://ploegert.gitbook.io/til/programmy/ruby/use-dotenv-in-a-non-rails-project.md)
- [Use Tap For Better Test Data Setup](https://ploegert.gitbook.io/til/programmy/ruby/use-tap-for-better-test-data-setup.md)
- [Using BCrypt To Create And Check Hashed Passwords](https://ploegert.gitbook.io/til/programmy/ruby/using-bcrypt-to-create-and-check-hashed-passwords.md)
- [What To Do When You Don't Rescue](https://ploegert.gitbook.io/til/programmy/ruby/what-to-do-when-you-dont-rescue.md)
- [Who Are My Ancestors?](https://ploegert.gitbook.io/til/programmy/ruby/who-are-my-ancestors.md)
- [Wrap Things In An Array, Even Hashes](https://ploegert.gitbook.io/til/programmy/ruby/wrap-things-in-an-array-even-hashes.md)
- [Zero Padding](https://ploegert.gitbook.io/til/programmy/ruby/zero-padding.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ploegert.gitbook.io/til/programmy/ruby.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
