Skip to content

Instantly share code, notes, and snippets.

@markburns
Created December 27, 2023 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markburns/ee2dcfe72aacd17422dcee297cf396cf to your computer and use it in GitHub Desktop.
Save markburns/ee2dcfe72aacd17422dcee297cf396cf to your computer and use it in GitHub Desktop.
interactify ideas
# 1
class SomeOrganizer
include Interactify
organize \
self.if(:key_set_on_context,
self.chain(DoThingA, ThenB, ThenC),
self.chain(DoDifferentThingB, ThenDifferentC)
),
EitherWayDoThis
end
# 2
class SomeOrganizer
include Interactify
organize \
self.if(:key_set_on_context,
then: [DoThingA, ThenB, ThenC],
else: [DoDifferentThingB, ThenDifferentC]
),
EitherWayDoThis
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment