markburns / markburns/interactify

support nested method calls like `each('order.line_items', A, B, C)`

Open
#28 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
Ruby
Stars
3
Forks
2
PR merge metrics
No merged PRs in 30d

Description

This is a common enough use case and the alternative is a little ugly:

organize \
  -> { _1.line_items = _1.order.line_items },
  each(:line_items, A, B, C)

VS

organize each('order.line_items', A, B, C)

Gut feeling suggests we can allow arbitrary length method chaining, but we should raise when the returned value is not Enumerable

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the implementation and tests for organizer iteration and the existing each(:line_items, A, B, C) behavior. Trace how method paths are resolved, then define the expected behavior for arbitrary chaining and for a non-Enumerable result; done means the nested example works and the invalid return value raises as specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.