ruby

Ruby Idioms (REQUIRED)

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ruby" with this command: npx skills add poletron/custom-rules/poletron-custom-rules-ruby

Critical Patterns

Ruby Idioms (REQUIRED)

✅ ALWAYS: Use Ruby idioms

users.map(&:name) # Symbol to proc user&.address&.city # Safe navigation name ||= "Default" # Memoization

Class Structure (REQUIRED)

✅ ALWAYS: Clear class structure

class User attr_reader :name, :email

def initialize(name:, email:) @name = name @email = email end

def admin? role == 'admin' end end

Error Handling (REQUIRED)

✅ Use custom exceptions

class UserNotFoundError < StandardError; end

def find_user!(id) user = User.find_by(id: id) raise UserNotFoundError, "User #{id} not found" unless user user end

Decision Tree

Need attribute access? → Use attr_reader/writer Need boolean check? → Use predicate method (?) Need dangerous operation? → Use bang method (!) Need configuration? → Use block with yield

Commands

ruby script.rb # Run script irb # Interactive Ruby bundle install # Install dependencies rspec # Run tests rubocop # Lint code

Resources

  • Clean Code: clean-code.md

  • TDD with RSpec: tdd-rspec.md

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

lancedb

No summary provided by upstream source.

Repository SourceNeeds Review
General

git-flow

No summary provided by upstream source.

Repository SourceNeeds Review
General

trpc

No summary provided by upstream source.

Repository SourceNeeds Review