Last active
October 27, 2017 05:33
-
-
Save hakanai/23c7885cacd17617c9878610c8619268 to your computer and use it in GitHub Desktop.
An esoteric Ruby problem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Currently writing: | |
let(:worker_script) do | |
<<-EOS | |
def nuix_worker_item_callback(worker_item) | |
source_item = worker_item.source_item | |
if source_item.parent.name =~ /Test Email/ | |
worker_item.process_embedded = "#{process_embedded}" | |
end | |
end | |
EOS | |
end | |
# Want to write: | |
let_for_heredoc(:worker_script) do | |
def nuix_worker_item_callback(worker_item) | |
source_item = worker_item.source_item | |
if source_item.parent.name =~ /Test Email/ | |
worker_item.process_embedded = "#{process_embedded}" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment