Skip to content

Instantly share code, notes, and snippets.

@drio
Created November 26, 2008 01:15
Show Gist options
  • Save drio/29213 to your computer and use it in GitHub Desktop.
Save drio/29213 to your computer and use it in GitHub Desktop.
def valid_run?(d)
%w{\. \.. qc test}.inject(true) { |prev, n| prev && (/#{n}/ =~ d) != 0 }
end
puts "drio VALID run?: " + valid_run?('drio').to_s
puts "test VALID run?: " + valid_run?('test_solid').to_s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment