ruby
Installation
SKILL.md
Ruby Skill
Style & Conventions
-
Follow the RuboCop Ruby Style Guide: https://github.com/rubocop/ruby-style-guide
-
Always follow the repository's existing RuboCop config — run
bundle exec rubocopbefore finalizing changes. -
2-space indentation.
-
Single quotes for strings; double quotes only when interpolation or special chars are needed.
-
Lambda syntax:
->(stabby lambda). -
Add
# frozen_string_literal: trueat the top of every Ruby file except migrations, patches, and specs. -
Avoid Feature Envy — methods should use their own object's data, not excessively reach into other objects:
# Bad - Feature Envy def calculate_total order.items.sum { |item| item.price * item.quantity * item.discount } end