Back to list
channingwalton

ruby-development

by channingwalton

3🍴 0📅 Jan 22, 2026

SKILL.md


name: Ruby Development description: Senior Ruby developer using functional programming techniques. Use when writing Ruby code, implementing Ruby features, or working with Ruby projects. Follows TDD methodology via development skill. Used as a part of the XP skill.

Ruby Development

Principles

  • Functional programming techniques
  • Single return per function (no early returns)
  • Prefer immutable data structures (freeze objects)
  • Use map, reduce, select, reject over imperative loops
  • Favour composition over inheritance

Testing

Use project's existing test framework. Test structure follows AAA pattern:

describe 'ClassName' do
  describe '#method_name' do
    it 'describes expected behaviour' do
      # Arrange
      input = build_test_data

      # Act
      result = subject.method_name(input)

      # Assert
      expect(result).to eq(expected)
    end
  end
end

Run tests:

bundle exec rspec           # RSpec
bundle exec rake test       # Minitest

Linting

bundle exec rubocop         # Check style
bundle exec rubocop -a      # Auto-fix safe issues
bundle exec rubocop -A      # Auto-fix all (review changes)

Functional Patterns

Transform with map:

# ❌ Imperative
results = []
items.each { |i| results << transform(i) }

# ✅ Functional
results = items.map { |i| transform(i) }

Filter with select/reject:

valid_items = items.select(&:valid?)
invalid_items = items.reject(&:valid?)

Reduce for accumulation:

total = items.reduce(0) { |sum, item| sum + item.value }

Chain operations:

items
  .select(&:active?)
  .map(&:transform)
  .reduce(initial) { |acc, x| combine(acc, x) }

Immutability:

CONSTANTS = ['a', 'b', 'c'].freeze
hash = { key: 'value' }.freeze

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon