title: Ruby Block syntax
body: <p>I was going through some code I found online and found the following</p>
  
  <pre><code>def change input 
     ('a'..'z').map { |letter| input.downcase.include?(letter) ? '1' : '0' }.join
  end
  </code></pre>
  
  <p>I understand what this code is doing. It will take a string, check if the string contains each letter of the alphabet and return 1 if true and 0 if false.</p>
  
  <p>However I am unfamiliar with this bit of syntax:</p>
  
  <pre><code>?(letter) ? '1' : '0' }
  </code></pre>
  
  <p>I know that a question mark is usually used to indicate that the method will return a boolean result. But I am insure why there is a second question mark after the argument. </p>
  
  <p>Also, I understand that this will return 1 if true and 0 if false. Is that what this colon represents. Is it always ok to use a colon like this if the result of the method in the block will be a boolean?</p>