HF RL Explorer

Task: Ruby ENV Variable with Default Fallback

Task: Ruby ENV Variable with Default Fallback: a task in Terminal-Lego-15k (Harbor dataset). Write a Ruby script that concisely assigns a variable from an environment variable if it is set (and non-empty), otherwise falls back to a default value. The goal is to use the most concise Ruby idiom(s)…

The task

Write a Ruby script that concisely assigns a variable from an environment variable if it is set (and non-empty), otherwise falls back to a default value. The goal is to use the most concise Ruby idiom(s) rather than verbose if/else blocks.

Part of PrimeIntellect/Terminal-Lego-15k.